Fix the effect of no-dso in crypto/init.c
authorRichard Levitte <levitte@openssl.org>
Fri, 11 Nov 2016 09:23:26 +0000 (10:23 +0100)
committerRichard Levitte <levitte@openssl.org>
Fri, 11 Nov 2016 09:23:26 +0000 (10:23 +0100)
When configured no-dso, there are no DSO_{whatever} macros defined.
Therefore, before checking those, you have to check if OPENSSL_NO_DSO
is defined.

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1902)

crypto/init.c

index 4363beeb1da720302e0e08649f1a5ce26153543c..e457b2dd0e89517649a319f65ac7e36c69908952 100644 (file)
@@ -81,7 +81,7 @@ DEFINE_RUN_ONCE_STATIC(ossl_init_base)
     OPENSSL_cpuid_setup();
     base_inited = 1;
 
-#ifndef OPENSSL_USE_NODELETE
+#if !defined(OPENSSL_NO_DSO) && !defined(OPENSSL_USE_NODELETE)
 # ifdef DSO_WIN32
     {
         HMODULE handle = NULL;
@@ -604,7 +604,7 @@ int OPENSSL_atexit(void (*handler)(void))
 {
     OPENSSL_INIT_STOP *newhand;
 
-#ifndef OPENSSL_USE_NODELETE
+#if !defined(OPENSSL_NO_DSO) && !defined(OPENSSL_USE_NODELETE)
     {
         union {
             void *sym;