From a9fe9b331833dad69c252b102c6fd2f2f1a2bc92 Mon Sep 17 00:00:00 2001 From: "Tom G. Christensen" 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 5e2cec6bb6..4350c8dbbf 100644 --- a/crypto/threads_pthread.c +++ b/crypto/threads_pthread.c @@ -70,10 +70,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.31.1