mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 07:09:15 +01:00
Use fdatasync instead of fsync on supported platforms
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user