diff options
-rw-r--r-- | db/extsort.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/db/extsort.cpp b/db/extsort.cpp index ec91bb749e4..1cb59bf4043 100644 --- a/db/extsort.cpp +++ b/db/extsort.cpp @@ -250,11 +250,16 @@ namespace mongo { } +#if defined(_WIN32) + static inline int win_read(int fd, const void *data, int count) { return _read(fd, data, count); } +#endif + + bool BSONObjExternalSorter::FileIterator::_read( char* buf, long long count ) { long long total = 0; while ( total < count ) { #ifdef _WIN32 - long long now = ::_read( _file, buf, count ); + long long now = win_read( _file, buf, count ); #else long long now = ::read( _file, buf, count ); #endif |