diff options
Diffstat (limited to 'util/logfile.cpp')
-rw-r--r-- | util/logfile.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/util/logfile.cpp b/util/logfile.cpp index a1ad982e52b..7068f3b35d4 100644 --- a/util/logfile.cpp +++ b/util/logfile.cpp @@ -140,7 +140,13 @@ namespace mongo { uasserted(13515, str::stream() << "error appending to file " << _fd << ' ' << errnoWithDescription()); } - if( fdatasync(_fd) < 0 ) { + if( +#if defined(__linux__) + fdatasync(_fd) < 0 +#else + fsync(_fd) +#endif + ) { uasserted(13514, str::stream() << "error appending to file on fsync " << ' ' << errnoWithDescription()); } |