diff options
author | Eliot Horowitz <eliot@10gen.com> | 2011-02-03 11:23:27 -0500 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2011-02-03 11:23:27 -0500 |
commit | 38364885c5fb0e171b45ce82c3e9569c81204098 (patch) | |
tree | 0dcb43dd5a6e868f2e4b3261de23cb3fbb2fbecb /util | |
parent | 4c26ae7633db58c0c5b89cc3bf6cbe9183838b12 (diff) | |
download | mongo-38364885c5fb0e171b45ce82c3e9569c81204098.tar.gz |
fdatasync is linux only
Diffstat (limited to 'util')
-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()); } |