Use fdatasync instead of fsync on supported platforms
@ -1119,7 +1119,11 @@ void FileCommit(FILE *fileout)
#ifdef WIN32
_commit(_fileno(fileout));
#else
#if defined(__linux__) || defined(__NetBSD__)
fdatasync(fileno(fileout));
fsync(fileno(fileout));
#endif
}