Use fdatasync instead of fsync on supported platforms

This commit is contained in:
Pieter Wuille 2012-09-28 14:27:20 +02:00
parent ee0b648536
commit e996521390

View File

@ -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
}