Use fdatasync instead of fsync on supported platforms
This commit is contained in:
parent
ee0b648536
commit
e996521390
1 changed files with 4 additions and 0 deletions
|
@ -1112,7 +1112,11 @@ void FileCommit(FILE *fileout)
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
_commit(_fileno(fileout));
|
_commit(_fileno(fileout));
|
||||||
#else
|
#else
|
||||||
|
#if defined(__linux__) || defined(__NetBSD__)
|
||||||
|
fdatasync(fileno(fileout));
|
||||||
|
#else
|
||||||
fsync(fileno(fileout));
|
fsync(fileno(fileout));
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue