summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tls.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tls.c b/tls.c
index 73dd6b5..111964c 100644
--- a/tls.c
+++ b/tls.c
@@ -188,6 +188,7 @@ init_openssl_rand_ (void)
}
#if defined HAVE_PTHREADS
+#if OPENSSL_VERSION_NUMBER < 0x10100000
/** Array of pthread_mutex_t for OpenSSL. Allocated and initialised in
\a init_locking_ and never freed. */
static pthread_mutex_t *s_openssl_mutexes = NULL;
@@ -224,6 +225,7 @@ init_locking_ ()
return 0;
}
+#endif /* OPENSSL_VERSION_NUMBER < 0x10100000 */
#endif /* HAVE_PTHREADS */
/** Initialise the TLS library. Return 0 on success, -1 on failure. */
@@ -232,6 +234,7 @@ tls_init ()
{
SSL_load_error_strings ();
#if defined HAVE_PTHREADS
+#if OPENSSL_VERSION_NUMBER < 0x10100000
if (CRYPTO_get_locking_callback () == NULL)
{
assert (s_openssl_mutexes_count == 0);
@@ -242,6 +245,7 @@ tls_init ()
return -1;
CRYPTO_set_locking_callback (openssl_locking_cb_);
}
+#endif /* OPENSSL_VERSION_NUMBER < 0x10100000 */
#endif /* HAVE_PTHREADS */
SSL_library_init ();
return init_openssl_rand_ ();