aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/init.c
diff options
context:
space:
mode:
authorEmilia Kasper <emilia@openssl.org>2016-03-11 21:13:19 +0100
committerEmilia Kasper <emilia@openssl.org>2016-03-12 16:21:33 +0100
commite4ad0763e86ab3677aab06a61acba4b157d185f7 (patch)
treedfd5f27698b7ad50cf86a114973ff8a18d053e68 /crypto/init.c
parent6f58da88119723f2b3a9ae53d0c71a64a5086312 (diff)
downloadopenssl-e4ad0763e86ab3677aab06a61acba4b157d185f7.tar.gz
Fix no-comp build
Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'crypto/init.c')
-rw-r--r--crypto/init.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/crypto/init.c b/crypto/init.c
index aac87deb4e..1fa5e89420 100644
--- a/crypto/init.c
+++ b/crypto/init.c
@@ -324,13 +324,16 @@ static void ossl_init_engine_afalg(void)
# endif
#endif
+#ifndef OPENSSL_NO_COMP
static CRYPTO_ONCE zlib = CRYPTO_ONCE_STATIC_INIT;
+
static int zlib_inited = 0;
static void ossl_init_zlib(void)
{
/* Do nothing - we need to know about this for the later cleanup */
zlib_inited = 1;
}
+#endif
static void ossl_init_thread_stop(struct thread_local_inits_st *locals)
{
@@ -426,6 +429,7 @@ void OPENSSL_cleanup(void)
* conditions for the various "*_inited" vars below.
*/
+#ifndef OPENSSL_NO_COMP
if (zlib_inited) {
#ifdef OPENSSL_INIT_DEBUG
fprintf(stderr, "OPENSSL_INIT: OPENSSL_cleanup: "
@@ -433,6 +437,7 @@ void OPENSSL_cleanup(void)
#endif
COMP_zlib_cleanup();
}
+#endif
#ifndef OPENSSL_NO_ASYNC
if (async_inited) {
@@ -600,9 +605,11 @@ int OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings)
}
#endif
+#ifndef OPENSSL_NO_COMP
if ((opts & OPENSSL_INIT_ZLIB)
&& CRYPTO_THREAD_run_once(&zlib, ossl_init_zlib))
return 0;
+#endif
return 1;
}