commit:     ee6ac60120137d9d3e6f56fa776802caa5d69e84
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 24 12:30:06 2016 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Thu Mar 24 12:30:24 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ee6ac601

net-misc/curl: fix build for 7.48.0 for libressl, bug #578098

Package-Manager: portage-2.2.26

 net-misc/curl/curl-7.48.0.ebuild               |  3 ++-
 net-misc/curl/files/curl-7.48.0-libressl.patch | 27 ++++++++++++++++++++++++++
 2 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/net-misc/curl/curl-7.48.0.ebuild b/net-misc/curl/curl-7.48.0.ebuild
index ae337f1..9bc5b8e 100644
--- a/net-misc/curl/curl-7.48.0.ebuild
+++ b/net-misc/curl/curl-7.48.0.ebuild
@@ -113,7 +113,8 @@ src_prepare() {
        epatch \
                "${FILESDIR}"/${PN}-7.30.0-prefix.patch \
                "${FILESDIR}"/${PN}-respect-cflags-3.patch \
-               "${FILESDIR}"/${PN}-fix-gnutls-nettle.patch
+               "${FILESDIR}"/${PN}-fix-gnutls-nettle.patch \
+               "${FILESDIR}"/${P}-libressl.patch
 
        sed -i '/LD_LIBRARY_PATH=/d' configure.ac || die #382241
 

diff --git a/net-misc/curl/files/curl-7.48.0-libressl.patch 
b/net-misc/curl/files/curl-7.48.0-libressl.patch
new file mode 100644
index 0000000..3a3fe83
--- /dev/null
+++ b/net-misc/curl/files/curl-7.48.0-libressl.patch
@@ -0,0 +1,27 @@
+See: https://bugs.gentoo.org/show_bug.cgi?id=578098
+
+commit 240cd84b494e0ffee8ad261c43b927d246cf6be1
+Author: Daniel Stenberg <[email protected]>
+Date:   Wed Mar 23 10:04:48 2016 +0100
+
+    openssl: fix ERR_remove_thread_state() for boringssl/libressl
+    
+    The removed arg is only done in OpenSSL
+    
+    Bug: https://twitter.com/xtraemeat/status/712564874098917376
+
+diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c
+index cbf2d21..b7e4462 100644
+--- a/lib/vtls/openssl.c
++++ b/lib/vtls/openssl.c
+@@ -95,7 +95,9 @@
+ 
+ #if (OPENSSL_VERSION_NUMBER >= 0x10000000L)
+ #define HAVE_ERR_REMOVE_THREAD_STATE 1
+-#if (OPENSSL_VERSION_NUMBER >= 0x10100004L)
++#if (OPENSSL_VERSION_NUMBER >= 0x10100004L) && \
++  !defined(LIBRESSL_VERSION_NUMBER) && \
++  !defined(OPENSSL_IS_BORINGSSL)
+ /* OpenSSL 1.1.0-pre4 removed the argument! */
+ #define HAVE_ERR_REMOVE_THREAD_STATE_NOARG 1
+ #endif

Reply via email to