mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-23 15:20:49 +01:00
Merge pull request #1879 from sipa/fdatasync
Use fdatasync instead of fsync on supported platforms
This commit is contained in:
commit
16f3618c13
1 changed files with 4 additions and 0 deletions
|
@ -1119,7 +1119,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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue