mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 04:52:59 +01:00
Merge pull request #2916 from sipa/leveldb-osxfsync
Import OSX fsync change from LevelDB subtree
This commit is contained in:
commit
3337481a4b
@ -62,12 +62,16 @@
|
|||||||
#define fflush_unlocked fflush
|
#define fflush_unlocked fflush
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(OS_MACOSX) || defined(OS_FREEBSD) ||\
|
#if defined(OS_FREEBSD) ||\
|
||||||
defined(OS_OPENBSD) || defined(OS_DRAGONFLYBSD)
|
defined(OS_OPENBSD) || defined(OS_DRAGONFLYBSD)
|
||||||
// Use fsync() on platforms without fdatasync()
|
// Use fsync() on platforms without fdatasync()
|
||||||
#define fdatasync fsync
|
#define fdatasync fsync
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(OS_MACOSX)
|
||||||
|
#define fdatasync(fd) fcntl(fd, F_FULLFSYNC, 0)
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(OS_ANDROID) && __ANDROID_API__ < 9
|
#if defined(OS_ANDROID) && __ANDROID_API__ < 9
|
||||||
// fdatasync() was only introduced in API level 9 on Android. Use fsync()
|
// fdatasync() was only introduced in API level 9 on Android. Use fsync()
|
||||||
// when targetting older platforms.
|
// when targetting older platforms.
|
||||||
|
Loading…
Reference in New Issue
Block a user