diff options
author | jperkin <jperkin@pkgsrc.org> | 2016-06-17 14:01:58 +0000 |
---|---|---|
committer | jperkin <jperkin@pkgsrc.org> | 2016-06-17 14:01:58 +0000 |
commit | e2f6b0bb90e2265356ebc302b8cab2066f049fd4 (patch) | |
tree | 8bad822938f6b674ce0a1b02ae5bd56eab03609d /databases/openldap | |
parent | 5909f5393ce1332ec93f8bae8b96dbd29e49daf5 (diff) | |
download | pkgsrc-e2f6b0bb90e2265356ebc302b8cab2066f049fd4.tar.gz |
Apply upstream patch to fix pthread mutex initialisation on SunOS. Bump
PKGREVISION for client and server.
Diffstat (limited to 'databases/openldap')
-rw-r--r-- | databases/openldap/distinfo | 3 | ||||
-rw-r--r-- | databases/openldap/patches/patch-libraries_liblmdb_mdb.c | 39 |
2 files changed, 41 insertions, 1 deletions
diff --git a/databases/openldap/distinfo b/databases/openldap/distinfo index 759c848649f..c83dcbdb770 100644 --- a/databases/openldap/distinfo +++ b/databases/openldap/distinfo @@ -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-dd) = 9c74118ff0b2232bda729c9917082fceef41dd16 SHA1 (patch-its7506) = a50f9428d6d7dd28f71d21e11ae3f8b0f1372f75 SHA1 (patch-its7595) = 9ea396adb7f2fd572d60190534caa80a01ef79d2 SHA1 (patch-libraries_libldap_os-local.c) = 7cd4f8638456fae12499de0d36d7802e47d3d688 +SHA1 (patch-libraries_liblmdb_mdb.c) = 590a059d784687f678ac44a577770551b11a2be5 diff --git a/databases/openldap/patches/patch-libraries_liblmdb_mdb.c b/databases/openldap/patches/patch-libraries_liblmdb_mdb.c new file mode 100644 index 00000000000..e30d5d6b87e --- /dev/null +++ b/databases/openldap/patches/patch-libraries_liblmdb_mdb.c @@ -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 */ + |