37 lines
1.3 KiB
Diff
37 lines
1.3 KiB
Diff
From 2c9c6a7cb7b9cbf8ee68bb55b29313a26d0d43bd Mon Sep 17 00:00:00 2001
|
|
From: "Tom G. Christensen" <tgc@jupiterrise.com>
|
|
Date: Wed, 27 Oct 2021 20:52:24 +0200
|
|
Subject: [PATCH 4/7] Fix build with posix95 pthreads
|
|
|
|
Solaris 2.6 only conforms to POSIX.1c pthreads which has no mutex
|
|
attribute support.
|
|
---
|
|
crypto/threads_pthread.c | 10 +++++++---
|
|
1 file changed, 7 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/crypto/threads_pthread.c b/crypto/threads_pthread.c
|
|
index 2792f82684..31005ad4c3 100644
|
|
--- a/crypto/threads_pthread.c
|
|
+++ b/crypto/threads_pthread.c
|
|
@@ -58,10 +58,14 @@ CRYPTO_RWLOCK *CRYPTO_THREAD_lock_new(void)
|
|
*/
|
|
pthread_mutexattr_init(&attr);
|
|
# if !defined (__TANDEM) && !defined (_SPT_MODEL_)
|
|
-# if !defined(NDEBUG) && !defined(OPENSSL_NO_MUTEX_ERRORCHECK)
|
|
- pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK);
|
|
+# if defined(PTHREAD_MUTEX_NORMAL)
|
|
+# if !defined(NDEBUG) && !defined(OPENSSL_NO_MUTEX_ERRORCHECK)
|
|
+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK);
|
|
+# else
|
|
+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_NORMAL);
|
|
+# endif
|
|
# else
|
|
- pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_NORMAL);
|
|
+ /* Assume POSIX.1c threads with no MUTEX type attribute. */
|
|
# endif
|
|
# else
|
|
/* The SPT Thread Library does not define MUTEX attributes. */
|
|
--
|
|
2.27.0
|
|
|