aboutsummaryrefslogtreecommitdiff
path: root/src/leveldb/port
diff options
context:
space:
mode:
authorPieter Wuille <sipa@ulyssis.org>2013-08-21 00:43:09 +0200
committerPieter Wuille <sipa@ulyssis.org>2013-08-21 00:43:20 +0200
commit980b1c3571788841c0725a2708f05b8079106783 (patch)
tree36d1f83f48bfaafbb821af68dc6bbf2d8aa2420b /src/leveldb/port
parente6552eed63f34fd68cf6c785dd23a241049fa73f (diff)
parent6519339fe849bdbbff047d9eef8ab6c5fbb3e2a4 (diff)
Merge commit '6519339fe849bdbbff047d9eef8ab6c5fbb3e2a4'
Diffstat (limited to 'src/leveldb/port')
-rw-r--r--src/leveldb/port/port_posix.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/leveldb/port/port_posix.h b/src/leveldb/port/port_posix.h
index f2b89bffb9..21c845e211 100644
--- a/src/leveldb/port/port_posix.h
+++ b/src/leveldb/port/port_posix.h
@@ -62,12 +62,16 @@
#define fflush_unlocked fflush
#endif
-#if defined(OS_MACOSX) || defined(OS_FREEBSD) ||\
+#if defined(OS_FREEBSD) ||\
defined(OS_OPENBSD) || defined(OS_DRAGONFLYBSD)
// Use fsync() on platforms without fdatasync()
#define fdatasync fsync
#endif
+#if defined(OS_MACOSX)
+#define fdatasync(fd) fcntl(fd, F_FULLFSYNC, 0)
+#endif
+
#if defined(OS_ANDROID) && __ANDROID_API__ < 9
// fdatasync() was only introduced in API level 9 on Android. Use fsync()
// when targetting older platforms.