From 4a42f42e40257360d87b2a3f2ec8b4442d8259d7 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 12 Jul 2023 09:16:57 +0000 Subject: [PATCH] openssl: add missing check for `LIBRESSL_VERSION_NUMBER` before use Fixes: ``` openssl.h:101:5: warning: "LIBRESSL_VERSION_NUMBER" is not defined [-Wundef] LIBRESSL_VERSION_NUMBER >= 0x3050000fL ^ ``` Ref: https://github.com/libssh2/libssh2/issues/1115#issuecomment-1631845640 Closes #1117 --- src/openssl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/openssl.h b/src/openssl.h index f2da003a..4a2b6319 100644 --- a/src/openssl.h +++ b/src/openssl.h @@ -99,7 +99,8 @@ #if (OPENSSL_VERSION_NUMBER >= 0x10100000L && \ !defined(LIBRESSL_VERSION_NUMBER)) || defined(LIBSSH2_WOLFSSL) || \ - LIBRESSL_VERSION_NUMBER >= 0x3050000fL + (defined(LIBRESSL_VERSION_NUMBER) && \ + LIBRESSL_VERSION_NUMBER >= 0x3050000fL) /* For wolfSSL, whether the structs are truly opaque or not, it's best to not * rely on their internal data members being exposed publicly. */ # define HAVE_OPAQUE_STRUCTS 1