summaryrefslogtreecommitdiff
path: root/openssl-compat.h
diff options
context:
space:
mode:
authorTheo Buehler <tb@openbsd.org>2021-11-21 21:38:20 +0100
committerAzat Khuzhin <azat@libevent.org>2021-11-30 22:32:18 +0300
commit883630f76cbf512003b81de25cd96cb75c6cf0f9 (patch)
tree7becb8c63a0c31907d3ab06124e97dec1b992cc3 /openssl-compat.h
parentf64f60a223215b9c38d1f04dbdc6246fa8513f7a (diff)
downloadlibevent-883630f76cbf512003b81de25cd96cb75c6cf0f9.tar.gz
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.
Diffstat (limited to 'openssl-compat.h')
-rw-r--r--openssl-compat.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/openssl-compat.h b/openssl-compat.h
index a23e3425..f5de2553 100644
--- a/openssl-compat.h
+++ b/openssl-compat.h
@@ -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