0001-Don-t-define-BIO_get_init-for-LibreSSL-3-5.patch 1.2 KB

1234567891011121314151617181920212223242526272829
  1. From 883630f76cbf512003b81de25cd96cb75c6cf0f9 Mon Sep 17 00:00:00 2001
  2. From: Theo Buehler <tb@openbsd.org>
  3. Date: Sun, 21 Nov 2021 21:38:20 +0100
  4. Subject: [PATCH] Don't define BIO_get_init() for LibreSSL 3.5+
  5. BIO_get_init() is available in LibreSSL 3.5 and later. The BIO type
  6. will become opaque, so the existing macro will break the build.
  7. [Retrieved from:
  8. https://github.com/libevent/libevent/commit/883630f76cbf512003b81de25cd96cb75c6cf0f9]
  9. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  10. ---
  11. openssl-compat.h | 3 ++-
  12. 1 file changed, 2 insertions(+), 1 deletion(-)
  13. diff --git a/openssl-compat.h b/openssl-compat.h
  14. index a23e34251b..f5de25539f 100644
  15. --- a/openssl-compat.h
  16. +++ b/openssl-compat.h
  17. @@ -40,7 +40,8 @@ static inline BIO_METHOD *BIO_meth_new(int type, const char *name)
  18. #endif /* (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
  19. (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L) */
  20. -#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x20700000L
  21. +#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x20700000L && \
  22. + LIBRESSL_VERSION_NUMBER < 0x30500000L
  23. #define BIO_get_init(b) (b)->init
  24. #endif