Use fdatasync instead of fsync on supported platforms
This commit is contained in:
@@ -1111,9 +1111,13 @@ void FileCommit(FILE *fileout)
|
||||
fflush(fileout); // harmless if redundantly called
|
||||
#ifdef WIN32
|
||||
_commit(_fileno(fileout));
|
||||
#else
|
||||
#if defined(__linux__) || defined(__NetBSD__)
|
||||
fdatasync(fileno(fileout));
|
||||
#else
|
||||
fsync(fileno(fileout));
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
int GetFilesize(FILE* file)
|
||||
|
||||
Reference in New Issue
Block a user