140-libarchive-fix-libressl.patch 1001 B

12345678910111213141516171819202122232425
  1. From 5da00ad75b09e262774ec3675bbe4d5a4502a852 Mon Sep 17 00:00:00 2001
  2. From: Bernard Spil <brnrd@FreeBSD.org>
  3. Date: Sun, 1 Apr 2018 23:01:44 +0200
  4. Subject: [PATCH] fix build with LibreSSL 2.7
  5. LibreSSL 2.7 adds OpenSSL 1.1 API leading to conflicts on method names
  6. See also: https://bugs.freebsd.org/226853
  7. Signed-off-by: Bernard Spil <brnrd@FreeBSD.org>
  8. ---
  9. libarchive/archive_openssl_hmac_private.h | 3 ++-
  10. 1 file changed, 2 insertions(+), 1 deletion(-)
  11. --- a/Utilities/cmlibarchive/libarchive/archive_openssl_evp_private.h
  12. +++ b/Utilities/cmlibarchive/libarchive/archive_openssl_evp_private.h
  13. @@ -28,7 +28,8 @@
  14. #include <openssl/evp.h>
  15. #include <openssl/opensslv.h>
  16. -#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
  17. +#if OPENSSL_VERSION_NUMBER < 0x10100000L || \
  18. + (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
  19. #include <stdlib.h> /* malloc, free */
  20. #include <string.h> /* memset */
  21. static inline EVP_MD_CTX *EVP_MD_CTX_new(void)