diff options
author | jbeich <jbeich@FreeBSD.org> | 2018-08-28 08:01:28 +0800 |
---|---|---|
committer | jbeich <jbeich@FreeBSD.org> | 2018-08-28 08:01:28 +0800 |
commit | 44834fcee73c60503a790a2e822375f796503ac9 (patch) | |
tree | 03c040aa899b47e0d3043d67ef71a723e0d183ef /databases | |
parent | 59ae37b430bda0bcc62d30bc7dd8c5d84eb1be1a (diff) | |
download | freebsd-ports-gnome-44834fcee73c60503a790a2e822375f796503ac9.tar.gz freebsd-ports-gnome-44834fcee73c60503a790a2e822375f796503ac9.tar.zst freebsd-ports-gnome-44834fcee73c60503a790a2e822375f796503ac9.zip |
databases/lmdb: switch to robust mutexes on FreeBSD >= 11
PR: 230564
Approved by: delphij (maintainer)
Diffstat (limited to 'databases')
-rw-r--r-- | databases/lmdb/Makefile | 1 | ||||
-rw-r--r-- | databases/lmdb/files/patch-mdb.c | 24 |
2 files changed, 19 insertions, 6 deletions
diff --git a/databases/lmdb/Makefile b/databases/lmdb/Makefile index 7942ae4c8bbd..1b74c21f3bec 100644 --- a/databases/lmdb/Makefile +++ b/databases/lmdb/Makefile @@ -4,6 +4,7 @@ PORTNAME= lmdb PORTVERSION= 0.9.22 DISTVERSIONPREFIX= ${PORTNAME:tu}_ +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= databases diff --git a/databases/lmdb/files/patch-mdb.c b/databases/lmdb/files/patch-mdb.c index 5194cbbeb91a..f0d9335e26b0 100644 --- a/databases/lmdb/files/patch-mdb.c +++ b/databases/lmdb/files/patch-mdb.c @@ -1,11 +1,23 @@ ---- mdb.c.orig 2017-06-01 16:51:10 UTC +- 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) + +--- mdb.c.orig 2018-03-22 15:23:05 UTC +++ mdb.c -@@ -125,6 +125,8 @@ typedef SSIZE_T ssize_t; - # define MDB_FDATASYNC fsync - #elif defined(ANDROID) +@@ -124,11 +124,12 @@ 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 ++#if defined(__APPLE__) || defined(ANDROID) || defined(__DragonFly__) || (defined(__FreeBSD__) && __FreeBSD__ < 11) # define MDB_FDATASYNC fsync -+#elif defined(__FreeBSD_version) && __FreeBSD_version < 1101000 -+# define MDB_FDATASYNC fsync +-#elif defined(ANDROID) +-# 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 |