mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-25 22:34:27 +00:00
Merge pull request #3000 from gmaxwell/more_osx_fsync
More fixes for blockchain corruption on OSX.
This commit is contained in:
commit
a25cd0bfdf
@ -1156,6 +1156,8 @@ void FileCommit(FILE *fileout)
|
|||||||
#else
|
#else
|
||||||
#if defined(__linux__) || defined(__NetBSD__)
|
#if defined(__linux__) || defined(__NetBSD__)
|
||||||
fdatasync(fileno(fileout));
|
fdatasync(fileno(fileout));
|
||||||
|
#elif defined(__APPLE__) && defined(F_FULLFSYNC)
|
||||||
|
fcntl(fileno(fileout), F_FULLFSYNC, 0);
|
||||||
#else
|
#else
|
||||||
fsync(fileno(fileout));
|
fsync(fileno(fileout));
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user