]> granicus.if.org Git - curl/commitdiff
openssl: fix build with OPENSSL_NO_COMP
authorMarcel Raad <raad@teamviewer.com>
Mon, 30 May 2016 11:26:20 +0000 (13:26 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 30 May 2016 13:31:14 +0000 (15:31 +0200)
With OPENSSL_NO_COMP defined, there is no function
SSL_COMP_free_compression_methods

Closes #836

lib/vtls/openssl.c

index 3a4bde5b34c5254812f5024d756f318d2f52843e..592bea5ff766ec6fce6d4328617201d3d3a6062b 100644 (file)
 #define HAVE_X509_GET0_SIGNATURE 1
 #endif
 
+#if OPENSSL_VERSION_NUMBER >= 0x10002003L && \
+  OPENSSL_VERSION_NUMBER <= 0x10002FFFL && \
+  !defined(OPENSSL_NO_COMP)
+#define HAVE_SSL_COMP_FREE_COMPRESSION_METHODS 1
+#endif
+
 #if (OPENSSL_VERSION_NUMBER < 0x0090808fL)
 /* not present in older OpenSSL */
 #define OPENSSL_load_builtin_modules(x)
@@ -748,8 +754,7 @@ void Curl_ossl_cleanup(void)
   /* Free all memory allocated by all configuration modules */
   CONF_modules_free();
 
-#if OPENSSL_VERSION_NUMBER >= 0x10002003L && \
-    OPENSSL_VERSION_NUMBER <= 0x10002FFFL
+#ifdef HAVE_SSL_COMP_FREE_COMPRESSION_METHODS
   SSL_COMP_free_compression_methods();
 #endif
 }