Browse Source

Use fdatasync instead of fsync on supported platforms

pull/145/head
Pieter Wuille 12 years ago
parent
commit
e996521390
  1. 4
      src/util.cpp

4
src/util.cpp

@ -1112,7 +1112,11 @@ void FileCommit(FILE *fileout)
#ifdef WIN32
_commit(_fileno(fileout));
#else
#if defined(__linux__) || defined(__NetBSD__)
fdatasync(fileno(fileout));
#else
fsync(fileno(fileout));
#endif
#endif
}

Loading…
Cancel
Save