]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
compile without warnings unthreaded.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Wed, 1 Aug 2012 14:07:04 +0000 (14:07 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Wed, 1 Aug 2012 14:07:04 +0000 (14:07 +0000)
git-svn-id: file:///svn/unbound/trunk@2737 be551aaa-1e26-0410-a405-d3ace91eadb9

util/net_help.c

index 72065d0342af70b34b22c8b9f6b424abc84bc9eb..d24d77c8aeeeb0a5cadd057ebe193bd09148beab 100644 (file)
@@ -726,7 +726,7 @@ void* outgoing_ssl_fd(void* sslctx, int fd)
 #endif
 }
 
-#ifdef OPENSSL_THREADS
+#if defined(OPENSSL_THREADS) && !defined(THREADS_DISABLED)
 /** global lock list for openssl locks */
 static lock_basic_t *ub_openssl_locks = NULL;
 
@@ -751,7 +751,7 @@ ub_crypto_lock_cb(int mode, int type, const char *ATTR_UNUSED(file),
 
 int ub_openssl_lock_init(void)
 {
-#ifdef OPENSSL_THREADS
+#if defined(OPENSSL_THREADS) && !defined(THREADS_DISABLED)
        int i;
        ub_openssl_locks = (lock_basic_t*)malloc(
                sizeof(lock_basic_t)*CRYPTO_num_locks());
@@ -768,7 +768,7 @@ int ub_openssl_lock_init(void)
 
 void ub_openssl_lock_delete(void)
 {
-#ifdef OPENSSL_THREADS
+#if defined(OPENSSL_THREADS) && !defined(THREADS_DISABLED)
        int i;
        if(!ub_openssl_locks)
                return;