Changeset View
Changeset View
Standalone View
Standalone View
www/firefox/files/patch-lmdb_robust
- This file was added.
- NetBSD has fdatasync(2), see https://github.com/NetBSD/src/commit/e963c41c6fb9 | |||||
- OpenBSD has fdatasync(3), see https://github.com/openbsd/src/commit/aa96fc3dc04f | |||||
- FreeBSD 11.0 has robust mutexes (see base r300043) and 11.1 has fdatasync(2) (see base r304977) | |||||
diff --git third_party/rust/lmdb-sys/lmdb/libraries/liblmdb/mdb.c third_party/rust/lmdb-sys/lmdb/libraries/liblmdb/mdb.c | |||||
index 90ac99f2d849c..a9cbc6300d587 100644 | |||||
--- third_party/rust/lmdb-sys/lmdb/libraries/liblmdb/mdb.c | |||||
+++ third_party/rust/lmdb-sys/lmdb/libraries/liblmdb/mdb.c | |||||
@@ -120,13 +120,14 @@ typedef SSIZE_T ssize_t; | |||||
#include <resolv.h> /* defines BYTE_ORDER on HPUX and Solaris */ | |||||
#endif | |||||
-#if defined(__APPLE__) || defined (BSD) || defined(__FreeBSD_kernel__) | |||||
-# define MDB_USE_POSIX_SEM 1 | |||||
-# define MDB_FDATASYNC fsync | |||||
-#elif defined(ANDROID) | |||||
+#if defined(__APPLE__) || defined(ANDROID) || defined(__DragonFly__) || (defined(__FreeBSD__) && __FreeBSD__ < 11) | |||||
# define MDB_FDATASYNC fsync | |||||
#endif | |||||
+#if defined(__APPLE__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) || (defined(__FreeBSD__) && __FreeBSD__ < 11) | |||||
+# define MDB_USE_POSIX_SEM 1 | |||||
+#endif | |||||
+ | |||||
#ifndef _WIN32 | |||||
#include <pthread.h> | |||||
#include <signal.h> |