We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a02ddf9 commit be1b0ffCopy full SHA for be1b0ff
port/port_posix.h
@@ -62,12 +62,16 @@
62
#define fflush_unlocked fflush
63
#endif
64
65
-#if defined(OS_MACOSX) || defined(OS_FREEBSD) ||\
+#if defined(OS_FREEBSD) ||\
66
defined(OS_OPENBSD) || defined(OS_DRAGONFLYBSD)
67
// Use fsync() on platforms without fdatasync()
68
#define fdatasync fsync
69
70
71
+#if defined(OS_MACOSX)
72
+#define fdatasync(fd) fcntl(fd, F_FULLFSYNC, 0)
73
+#endif
74
+
75
#if defined(OS_ANDROID) && __ANDROID_API__ < 9
76
// fdatasync() was only introduced in API level 9 on Android. Use fsync()
77
// when targetting older platforms.
0 commit comments