diff options
author | orbea <orbea@riseup.net> | 2023-05-02 09:45:03 -0700 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-05-02 21:47:06 +0100 |
commit | 339d581366252f59abd7b6a9fe06d4c5c08af0c2 (patch) | |
tree | 828fdab7d9865823150a5ed7034b5411b3cb914e /dev-libs/libevent | |
parent | media-libs/vigra: Stabilize 1.11.1-r9 x86, #905611 (diff) | |
download | gentoo-339d581366252f59abd7b6a9fe06d4c5c08af0c2.tar.gz gentoo-339d581366252f59abd7b6a9fe06d4c5c08af0c2.tar.bz2 gentoo-339d581366252f59abd7b6a9fe06d4c5c08af0c2.zip |
dev-libs/libevent: add upstream libressl patch
This fixes the build with LibreSSL >= 3.5 when the BIO_get_init()
function became available.
Bug: https://bugs.gentoo.org/903001
Upstream-Issue: https://github.com/libevent/libevent/issues/1277
Upstream-PR: https://github.com/libevent/libevent/pull/1227
Upstream-Commit: https://github.com/libevent/libevent/commit/883630f76cbf512003b81de25cd96cb75c6cf0f9
Signed-off-by: orbea <orbea@riseup.net>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-libs/libevent')
-rw-r--r-- | dev-libs/libevent/files/libevent-2.1.12-libressl.patch | 30 | ||||
-rw-r--r-- | dev-libs/libevent/libevent-2.1.12-r1.ebuild | 4 |
2 files changed, 34 insertions, 0 deletions
diff --git a/dev-libs/libevent/files/libevent-2.1.12-libressl.patch b/dev-libs/libevent/files/libevent-2.1.12-libressl.patch new file mode 100644 index 000000000000..4c809aface12 --- /dev/null +++ b/dev-libs/libevent/files/libevent-2.1.12-libressl.patch @@ -0,0 +1,30 @@ +https://bugs.gentoo.org/903001 +https://github.com/libevent/libevent/issues/1277 +https://github.com/libevent/libevent/pull/1227 +https://github.com/libevent/libevent/commit/883630f76cbf512003b81de25cd96cb75c6cf0f9 + +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 a/openssl-compat.h b/openssl-compat.h +index a23e34251b..f5de25539f 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 + diff --git a/dev-libs/libevent/libevent-2.1.12-r1.ebuild b/dev-libs/libevent/libevent-2.1.12-r1.ebuild index 2077b9fd606f..bc2c6da3c012 100644 --- a/dev-libs/libevent/libevent-2.1.12-r1.ebuild +++ b/dev-libs/libevent/libevent-2.1.12-r1.ebuild @@ -37,6 +37,10 @@ MULTILIB_WRAPPED_HEADERS=( ) S=${WORKDIR}/${P/_/-}-stable +PATCHES=( + "${FILESDIR}"/${P}-libressl.patch #903001 +) + src_prepare() { default # bug #767472 |