Merge pull request #3000 from gmaxwell/more_osx_fsync
More fixes for blockchain corruption on OSX.
This commit is contained in:
commit
a25cd0bfdf
1 changed files with 2 additions and 0 deletions
|
@ -1156,6 +1156,8 @@ void FileCommit(FILE *fileout)
|
|||
#else
|
||||
#if defined(__linux__) || defined(__NetBSD__)
|
||||
fdatasync(fileno(fileout));
|
||||
#elif defined(__APPLE__) && defined(F_FULLFSYNC)
|
||||
fcntl(fileno(fileout), F_FULLFSYNC, 0);
|
||||
#else
|
||||
fsync(fileno(fileout));
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue