aboutsummaryrefslogtreecommitdiff
path: root/external/unbound/util/net_help.c
diff options
context:
space:
mode:
Diffstat (limited to 'external/unbound/util/net_help.c')
-rw-r--r--external/unbound/util/net_help.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/external/unbound/util/net_help.c b/external/unbound/util/net_help.c
index eb03cd0ae..6c0d68e31 100644
--- a/external/unbound/util/net_help.c
+++ b/external/unbound/util/net_help.c
@@ -783,9 +783,9 @@ void* outgoing_ssl_fd(void* sslctx, int fd)
#endif
}
-#if defined(HAVE_SSL) && defined(OPENSSL_THREADS) && !defined(THREADS_DISABLED)
+#if defined(HAVE_SSL) && defined(OPENSSL_THREADS) && !defined(THREADS_DISABLED) && defined(CRYPTO_LOCK) && OPENSSL_VERSION_NUMBER < 0x10100000L
/** global lock list for openssl locks */
-static lock_basic_t *ub_openssl_locks = NULL;
+static lock_basic_type *ub_openssl_locks = NULL;
/** callback that gets thread id for openssl */
static unsigned long
@@ -808,10 +808,10 @@ ub_crypto_lock_cb(int mode, int type, const char *ATTR_UNUSED(file),
int ub_openssl_lock_init(void)
{
-#if defined(HAVE_SSL) && defined(OPENSSL_THREADS) && !defined(THREADS_DISABLED)
+#if defined(HAVE_SSL) && defined(OPENSSL_THREADS) && !defined(THREADS_DISABLED) && defined(CRYPTO_LOCK) && OPENSSL_VERSION_NUMBER < 0x10100000L
int i;
- ub_openssl_locks = (lock_basic_t*)reallocarray(
- NULL, (size_t)CRYPTO_num_locks(), sizeof(lock_basic_t));
+ ub_openssl_locks = (lock_basic_type*)reallocarray(
+ NULL, (size_t)CRYPTO_num_locks(), sizeof(lock_basic_type));
if(!ub_openssl_locks)
return 0;
for(i=0; i<CRYPTO_num_locks(); i++) {
@@ -825,7 +825,7 @@ int ub_openssl_lock_init(void)
void ub_openssl_lock_delete(void)
{
-#if defined(HAVE_SSL) && defined(OPENSSL_THREADS) && !defined(THREADS_DISABLED)
+#if defined(HAVE_SSL) && defined(OPENSSL_THREADS) && !defined(THREADS_DISABLED) && defined(CRYPTO_LOCK) && OPENSSL_VERSION_NUMBER < 0x10100000L
int i;
if(!ub_openssl_locks)
return;