Hi William, Please find attached a patch I used in order to remove some LIBRESSL_VERSION_NUMBER warnings when building haproxy 2.5.4 with an old version of OpenSSL.
Cheers, Julien
>From 88defc4fb4989018c5348ebfe0d70dd223860981 Mon Sep 17 00:00:00 2001 From: Julien Thomas <[email protected]> Date: Mon, 28 Feb 2022 21:55:55 +0100 Subject: [PATCH] BUILD ssl: another build warning on LIBRESSL_VERSION_NUMBER We had several warnings when building haproxy 2.5.4 with old openssl 1.0.1e. This version of openssl is the latest available in EOL centos 6. include/haproxy/openssl-compat.h:157:51: \ warning: "LIBRESSL_VERSION_NUMBER" is not defined This patch fixed the build. It changes the #if condition, as done in other similar parts of openssl-compat.h. --- include/haproxy/openssl-compat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/haproxy/openssl-compat.h b/include/haproxy/openssl-compat.h index 123b76ede..b0789c9cc 100644 --- a/include/haproxy/openssl-compat.h +++ b/include/haproxy/openssl-compat.h @@ -154,7 +154,7 @@ static inline int SSL_SESSION_set1_id_context(SSL_SESSION *s, const unsigned cha #endif -#if (HA_OPENSSL_VERSION_NUMBER < 0x1000200fL) && (LIBRESSL_VERSION_NUMBER < 0x2070500fL) +#if (HA_OPENSSL_VERSION_NUMBER < 0x1000200fL) && (!defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER < 0x2070500fL) /* introduced in openssl 1.0.2 */ static inline STACK_OF(X509) *X509_chain_up_ref(STACK_OF(X509) *chain) -- 2.21.1

