pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/databases Apply upstream patch to fix pthread mutex in...
details: https://anonhg.NetBSD.org/pkgsrc/rev/10d4c17faadd
branches: trunk
changeset: 348655:10d4c17faadd
user: jperkin <jperkin%pkgsrc.org@localhost>
date: Fri Jun 17 14:01:58 2016 +0000
description:
Apply upstream patch to fix pthread mutex initialisation on SunOS. Bump
PKGREVISION for client and server.
diffstat:
databases/openldap-client/Makefile | 4 +-
databases/openldap-server/Makefile | 4 +-
databases/openldap/distinfo | 3 +-
databases/openldap/patches/patch-libraries_liblmdb_mdb.c | 39 ++++++++++++++++
4 files changed, 45 insertions(+), 5 deletions(-)
diffs (83 lines):
diff -r fe07f7c86f17 -r 10d4c17faadd databases/openldap-client/Makefile
--- a/databases/openldap-client/Makefile Fri Jun 17 13:56:53 2016 +0000
+++ b/databases/openldap-client/Makefile Fri Jun 17 14:01:58 2016 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.23 2016/03/05 11:27:43 jperkin Exp $
+# $NetBSD: Makefile,v 1.24 2016/06/17 14:01:58 jperkin Exp $
PKGNAME= ${DISTNAME:S/-/-client-/}
-PKGREVISION= 1
+PKGREVISION= 2
COMMENT= Lightweight Directory Access Protocol libraries and client programs
CONFLICTS+= openldap<2.3.23nb1
diff -r fe07f7c86f17 -r 10d4c17faadd databases/openldap-server/Makefile
--- a/databases/openldap-server/Makefile Fri Jun 17 13:56:53 2016 +0000
+++ b/databases/openldap-server/Makefile Fri Jun 17 14:01:58 2016 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.47 2016/03/05 11:28:12 jperkin Exp $
+# $NetBSD: Makefile,v 1.48 2016/06/17 14:01:58 jperkin Exp $
PKGNAME= ${DISTNAME:S/-/-server-/}
-PKGREVISION= 1
+PKGREVISION= 2
COMMENT= Lightweight Directory Access Protocol server suite
CONFLICTS+= openldap<2.3.23nb1
diff -r fe07f7c86f17 -r 10d4c17faadd databases/openldap/distinfo
--- a/databases/openldap/distinfo Fri Jun 17 13:56:53 2016 +0000
+++ b/databases/openldap/distinfo Fri Jun 17 14:01:58 2016 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.105 2016/02/07 08:42:59 adam Exp $
+$NetBSD: distinfo,v 1.106 2016/06/17 14:01:58 jperkin Exp $
SHA1 (openldap-2.4.44.tgz) = 016a738d050a68d388602a74b5e991035cdba149
RMD160 (openldap-2.4.44.tgz) = 6ea3139f630e93c6e0af60638672d88d6c535a6a
@@ -21,3 +21,4 @@
SHA1 (patch-its7506) = a50f9428d6d7dd28f71d21e11ae3f8b0f1372f75
SHA1 (patch-its7595) = 9ea396adb7f2fd572d60190534caa80a01ef79d2
SHA1 (patch-libraries_libldap_os-local.c) = 7cd4f8638456fae12499de0d36d7802e47d3d688
+SHA1 (patch-libraries_liblmdb_mdb.c) = 590a059d784687f678ac44a577770551b11a2be5
diff -r fe07f7c86f17 -r 10d4c17faadd databases/openldap/patches/patch-libraries_liblmdb_mdb.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/openldap/patches/patch-libraries_liblmdb_mdb.c Fri Jun 17 14:01:58 2016 +0000
@@ -0,0 +1,39 @@
+$NetBSD: patch-libraries_liblmdb_mdb.c,v 1.1 2016/06/17 14:01:58 jperkin Exp $
+
+Apply https://www.gulag.ch/www/download/0001-Solaris-robust-mutex-fix.patch
+
+--- libraries/liblmdb/mdb.c.orig 2016-02-05 23:57:45.000000000 +0000
++++ libraries/liblmdb/mdb.c
+@@ -257,7 +257,7 @@ typedef SSIZE_T ssize_t;
+ # else
+ # define MDB_USE_ROBUST 1
+ /* glibc < 2.12 only provided _np API */
+-# if defined(__GLIBC__) && GLIBC_VER < 0x02000c
++# if (defined(__GLIBC__) && GLIBC_VER < 0x02000a) || defined(__SunOS_5_10)
+ # define PTHREAD_MUTEX_ROBUST PTHREAD_MUTEX_ROBUST_NP
+ # define pthread_mutexattr_setrobust(attr, flag) pthread_mutexattr_setrobust_np(attr, flag)
+ # define pthread_mutex_consistent(mutex) pthread_mutex_consistent_np(mutex)
+@@ -4623,10 +4623,21 @@ mdb_env_setup_locks(MDB_env *env, char *
+ || (rc = pthread_mutexattr_setpshared(&mattr, PTHREAD_PROCESS_SHARED))
+ #ifdef MDB_ROBUST_SUPPORTED
+ || (rc = pthread_mutexattr_setrobust(&mattr, PTHREAD_MUTEX_ROBUST))
+-#endif
++#else
++ #ifndef __sun
+ || (rc = pthread_mutex_init(env->me_txns->mti_rmutex, &mattr))
+- || (rc = pthread_mutex_init(env->me_txns->mti_wmutex, &mattr)))
++ || (rc = pthread_mutex_init(env->me_txns->mti_wmutex, &mattr))
++ #endif
++#endif
++ ) {
+ goto fail;
++ }
++ #ifdef __sun
++ rc = pthread_mutex_init(env->me_txns->mti_rmutex, &mattr);
++ if (!(rc == EBUSY || rc == EINVAL)) goto fail;
++ rc = pthread_mutex_init(env->me_txns->mti_wmutex, &mattr);
++ if (!(rc == EBUSY || rc == EINVAL)) goto fail;
++ #endif
+ pthread_mutexattr_destroy(&mattr);
+ #endif /* _WIN32 || MDB_USE_POSIX_SEM */
+
Home |
Main Index |
Thread Index |
Old Index