From dc66ec8d4c49995268a3425ac2793ebad116595c Mon Sep 17 00:00:00 2001 From: Xin LI Date: Sat, 7 Dec 2019 23:31:47 +0000 Subject: [PATCH] net/openldap24-server: back_mdb: use robust mutexes. PR: 197514 --- net/openldap24-server/Makefile | 2 +- .../files/patch-libraries_liblmdb_mdb.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 net/openldap24-server/files/patch-libraries_liblmdb_mdb.c diff --git a/net/openldap24-server/Makefile b/net/openldap24-server/Makefile index ffd2840cee40..3e27cddc6703 100644 --- a/net/openldap24-server/Makefile +++ b/net/openldap24-server/Makefile @@ -65,7 +65,7 @@ BROKEN= incompatible OpenLDAP version: ${WANT_OPENLDAP_VER} .endif PORTREVISION_CLIENT= 0 -PORTREVISION_SERVER= 2 +PORTREVISION_SERVER= 3 OPENLDAP_SHLIB_MAJOR= 2 OPENLDAP_SHLIB_MINOR= 10.11 OPENLDAP_MAJOR= ${DISTVERSION:R} diff --git a/net/openldap24-server/files/patch-libraries_liblmdb_mdb.c b/net/openldap24-server/files/patch-libraries_liblmdb_mdb.c new file mode 100644 index 000000000000..293f9fa06925 --- /dev/null +++ b/net/openldap24-server/files/patch-libraries_liblmdb_mdb.c @@ -0,0 +1,14 @@ +--- libraries/liblmdb/mdb.c.orig 2019-07-23 14:46:22 UTC ++++ libraries/liblmdb/mdb.c +@@ -124,7 +124,10 @@ typedef SSIZE_T ssize_t; + #include /* defines BYTE_ORDER on HPUX and Solaris */ + #endif + +-#if defined(__APPLE__) || defined (BSD) || defined(__FreeBSD_kernel__) ++#if defined(__FreeBSD__) ++# define MDB_USE_POSIX_MUTEX 1 ++# define MDB_USE_ROBUST 1 ++#elif defined(__APPLE__) || defined (BSD) || defined(__FreeBSD_kernel__) + # define MDB_USE_POSIX_SEM 1 + # define MDB_FDATASYNC fsync + #elif defined(ANDROID)