diff options
author | Jeff Garzik <jgarzik@bitpay.com> | 2013-09-16 06:25:12 -0700 |
---|---|---|
committer | Jeff Garzik <jgarzik@bitpay.com> | 2013-09-16 06:25:12 -0700 |
commit | a25cd0bfdfd8736fab3ebf672ce8cfa1577fdb08 (patch) | |
tree | 3900851f0882d6999ab46b0c959b3728b1df5be1 | |
parent | 17e0f675058f6d15b3f1629995342a5ed93ed3f5 (diff) | |
parent | e7bad10c12ce9b5d424ac273c1c977b88469d46c (diff) |
Merge pull request #3000 from gmaxwell/more_osx_fsync
More fixes for blockchain corruption on OSX.
-rw-r--r-- | src/util.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/util.cpp b/src/util.cpp index 136a035485..16c8f3fc17 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -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 |