aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@bitpay.com>2013-09-16 06:25:12 -0700
committerJeff Garzik <jgarzik@bitpay.com>2013-09-16 06:25:12 -0700
commita25cd0bfdfd8736fab3ebf672ce8cfa1577fdb08 (patch)
tree3900851f0882d6999ab46b0c959b3728b1df5be1 /src
parent17e0f675058f6d15b3f1629995342a5ed93ed3f5 (diff)
parente7bad10c12ce9b5d424ac273c1c977b88469d46c (diff)
Merge pull request #3000 from gmaxwell/more_osx_fsync
More fixes for blockchain corruption on OSX.
Diffstat (limited to 'src')
-rw-r--r--src/util.cpp2
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