]> granicus.if.org Git - libevent/commitdiff
Don't define BIO_get_init() for LibreSSL 3.5+
authorTheo Buehler <tb@openbsd.org>
Sun, 21 Nov 2021 20:38:20 +0000 (21:38 +0100)
committerAzat Khuzhin <azat@libevent.org>
Tue, 30 Nov 2021 19:32:18 +0000 (22:32 +0300)
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

index a23e34251b90d5dfd068b2b55de10c6332e65304..f5de25539fd0b079f4024d43e6778e6d4eb30362 100644 (file)
@@ -40,7 +40,8 @@ static inline BIO_METHOD *BIO_meth_new(int type, const char *name)
 #endif /* (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
        (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L) */
 
-#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x20700000L
+#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x20700000L && \
+       LIBRESSL_VERSION_NUMBER < 0x30500000L
 #define BIO_get_init(b) (b)->init
 #endif