Ticket #66096: BIO_get_init_libressl3.5.patch

File BIO_get_init_libressl3.5.patch, 1023 bytes (added by daphnediane (Daphne Pfister), 19 months ago)
  • openssl-compat.h

    From 883630f76cbf512003b81de25cd96cb75c6cf0f9 Mon Sep 17 00:00:00 2001
    From: Theo Buehler <tb@openbsd.org>
    Date: Sun, 21 Nov 2021 21:38:20 +0100
    Subject: [PATCH] Don't define BIO_get_init() for LibreSSL 3.5+
    
    BIO_get_init() is available in LibreSSL 3.5 and later. The BIO type
    will become opaque, so the existing macro will break the build.
    ---
     openssl-compat.h | 3 ++-
     1 file changed, 2 insertions(+), 1 deletion(-)
    
    diff --git openssl-compat.h.orig openssl-compat.h
    index a23e34251..f5de25539 100644
    old new static inline BIO_METHOD *BIO_meth_new(int type, const char *name) 
    4040#endif /* (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
    4141        (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L) */
    4242
    43 #if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x20700000L
     43#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x20700000L && \
     44        LIBRESSL_VERSION_NUMBER < 0x30500000L
    4445#define BIO_get_init(b) (b)->init
    4546#endif
    4647