[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#8739) Better check for fsync on FreeBSD



Full_Name: Pietro Cerutti
Version: lmdb 0.9.21
OS: FreeBSD 11.1
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (69.191.176.33)


This patch allows for a finer-grained control over which FreeBSD versions
support fdatasync. This allows us to get rid of a custom patch in our ports.

--- mdb.c.orig  2017-06-01 16:51:10 UTC
+++ mdb.c
@@ -125,6 +125,8 @@ typedef SSIZE_T     ssize_t;
 # define MDB_FDATASYNC         fsync
 #elif defined(ANDROID)
 # define MDB_FDATASYNC         fsync
+#elif defined(__FreeBSD_version) && __FreeBSD_version < 1101000
+# define MDB_FDATASYNC         fsync
 #endif

 #ifndef _WIN32