From: Enji Cooper Date: Sat, 13 May 2023 00:03:04 +0000 (-0700) Subject: Fix the build with libressl-devel <2.7 X-Git-Tag: v3.7.0~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e9f9361139b816c0327a95dcbc6339c84ed1410;p=thirdparty%2Flibarchive.git Fix the build with libressl-devel <2.7 This change is similar to what was done in 5da00ad75b09e262774ec3675bbe4d5a4502a852. Co-authored by: Greg Lewis Co-authored by: Piotr Kubaj Obtained from: FreeBSD ports (9fcaa71e4675d12dc3c9a5895edd68610e03cbcd) Signed-off-by: Enji Cooper --- diff --git a/libarchive/archive_openssl_evp_private.h b/libarchive/archive_openssl_evp_private.h index ebb06702d..8ac477280 100644 --- a/libarchive/archive_openssl_evp_private.h +++ b/libarchive/archive_openssl_evp_private.h @@ -33,7 +33,8 @@ #include #include -#if OPENSSL_VERSION_NUMBER < 0x10100000L +#if OPENSSL_VERSION_NUMBER < 0x10100000L || \ + (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL) #include /* malloc, free */ #include /* memset */ static inline EVP_MD_CTX *EVP_MD_CTX_new(void)