diff options
author | dwight <dwight@dwights-MacBook-Pro.local> | 2010-09-09 07:46:22 -0400 |
---|---|---|
committer | dwight <dwight@dwights-MacBook-Pro.local> | 2010-09-09 07:46:22 -0400 |
commit | 72a9a42bdb6411bf2167a7d6095abf3b3574e791 (patch) | |
tree | 40bea3d19fe6661af815b2658598aa24529fd6db /util/mmap_posix.cpp | |
parent | c8401a237f0cb21f29bbe6772cff612d23b94ece (diff) | |
download | mongo-72a9a42bdb6411bf2167a7d6095abf3b3574e791.tar.gz |
compile
Diffstat (limited to 'util/mmap_posix.cpp')
-rw-r--r-- | util/mmap_posix.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/util/mmap_posix.cpp b/util/mmap_posix.cpp index af1592c24d4..4adc8b73c4c 100644 --- a/util/mmap_posix.cpp +++ b/util/mmap_posix.cpp @@ -50,7 +50,7 @@ namespace mongo { #define O_NOATIME 0 #endif - void* MemoryMappedFile::map(const char *filename, long &length, int options) { + void* MemoryMappedFile::map(const char *filename, unsigned long long &length, int options) { // length may be updated by callee. _filename = filename; theFileAllocator().allocateAsap( filename, length ); @@ -65,7 +65,7 @@ namespace mongo { return 0; } - off_t filelen = lseek(fd, 0, SEEK_END); + unsigned long long filelen = lseek(fd, 0, SEEK_END); if ( filelen != length ){ cout << "wanted length: " << length << " filelen: " << filelen << endl; cout << sizeof(size_t) << endl; @@ -77,7 +77,7 @@ namespace mongo { if ( view == MAP_FAILED ) { out() << " mmap() failed for " << filename << " len:" << length << " " << errnoWithDescription() << endl; if ( errno == ENOMEM ){ - out() << " mmap failed with out of memory, if you're using 32-bits, then you probably need to upgrade to 64" << endl; + out() << "mmap failed with out of memory, if you're using 32-bits, then you probably need to upgrade to 64" << endl; } return 0; } |