diff options
author | Bernard Spil <brnrd@FreeBSD.org> | 2018-04-02 13:18:27 +0200 |
---|---|---|
committer | Azat Khuzhin <a3at.mail@gmail.com> | 2018-04-02 23:13:28 +0300 |
commit | 28b8075400c70b2d2da2ce07e590c2ec6d11783d (patch) | |
tree | 1eb54f31774a6dd39f3f52f14dc3aacdafca223f /openssl-compat.h | |
parent | 33baa4e59fbf9432d77a19c6b2b45402580b79a5 (diff) | |
download | libevent-28b8075400c70b2d2da2ce07e590c2ec6d11783d.tar.gz |
Fix build with LibreSSL 2.7
LibreSSL 2.7 implements OpenSSL 1.1 API except for BIO_get_init()
See also: https://bugs.freebsd.org/226900
Signed-off-by: Bernard Spil <brnrd@FreeBSD.org>
Closes: #617 (cherry-pick)
Diffstat (limited to 'openssl-compat.h')
-rw-r--r-- | openssl-compat.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/openssl-compat.h b/openssl-compat.h index bffd2593..5d91ac64 100644 --- a/openssl-compat.h +++ b/openssl-compat.h @@ -4,7 +4,8 @@ #include <openssl/bio.h> #include "util-internal.h" -#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) +#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \ + (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L) static inline BIO_METHOD *BIO_meth_new(int type, const char *name) { @@ -33,6 +34,11 @@ static inline BIO_METHOD *BIO_meth_new(int type, const char *name) #define TLS_method SSLv23_method -#endif /* (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) */ +#endif /* (OPENSSL_VERSION_NUMBER < 0x10100000L) || \ + (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L) */ + +#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x20700000L +#define BIO_get_init(b) (b)->init +#endif #endif /* OPENSSL_COMPAT_H */ |