From: Ondřej Surý Date: Thu, 14 Jun 2018 21:54:48 +0000 (+0200) Subject: Put proper guards in openssl_shim.{c,h} when compiling with PKCS#11 X-Git-Tag: v9.13.2~33^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=38060959c7706acf73fb89042f17f28b0f7b1be4;p=thirdparty%2Fbind9.git Put proper guards in openssl_shim.{c,h} when compiling with PKCS#11 --- diff --git a/lib/isc/openssl_shim.c b/lib/isc/openssl_shim.c index 96455fc2047..70435c9c6e6 100644 --- a/lib/isc/openssl_shim.c +++ b/lib/isc/openssl_shim.c @@ -11,9 +11,11 @@ #include +#if HAVE_OPENSSL + #include -#if HAVE_OPENSSL && (OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)) +#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) #include #include @@ -92,4 +94,6 @@ int HMAC_CTX_reset(HMAC_CTX *ctx) { return 1; } -#endif +#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) */ + +#endif /* HAVE_OPENSSL */ diff --git a/lib/isc/openssl_shim.h b/lib/isc/openssl_shim.h index b10b63b1a25..d6ff64a595a 100644 --- a/lib/isc/openssl_shim.h +++ b/lib/isc/openssl_shim.h @@ -9,11 +9,12 @@ * information regarding copyright ownership. */ -#ifndef ISC_OPENSSL_P_H -#define ISC_OPENSSL_P_H +#pragma once #include +#if HAVE_OPENSSL + #include #if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) @@ -31,6 +32,6 @@ HMAC_CTX *HMAC_CTX_new(void); void HMAC_CTX_free(HMAC_CTX *ctx); int HMAC_CTX_reset(HMAC_CTX *ctx); -#endif /* ISC_OPENSSL_P_H */ +#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) */ -#endif /* ISC_OPENSSL_P_H */ +#endif /* HAVE_OPENSSL */