summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2020-02-11 12:18:21 +0100
committerLars Wendler <polynomial-c@gentoo.org>2020-02-11 12:19:34 +0100
commit5b410baabbda721370fef400b1d9a298760c7d04 (patch)
tree293accc6358305e2c73198dfa33f33c33de6de7e
parentapp-misc/mc: amd64 stable wrt bug #708896 (diff)
downloadgentoo-5b410baabbda721370fef400b1d9a298760c7d04.tar.gz
gentoo-5b410baabbda721370fef400b1d9a298760c7d04.tar.bz2
gentoo-5b410baabbda721370fef400b1d9a298760c7d04.zip
net-libs/mbedtls: Fixed compilation with USE="zlib"
Closes: https://bugs.gentoo.org/706112 Package-Manager: Portage-2.3.88, Repoman-2.3.20 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
-rw-r--r--net-libs/mbedtls/files/mbedtls-2.19.1-zlib.patch29
-rw-r--r--net-libs/mbedtls/mbedtls-2.19.1-r2.ebuild1
2 files changed, 30 insertions, 0 deletions
diff --git a/net-libs/mbedtls/files/mbedtls-2.19.1-zlib.patch b/net-libs/mbedtls/files/mbedtls-2.19.1-zlib.patch
new file mode 100644
index 00000000000..ba4559cfc9b
--- /dev/null
+++ b/net-libs/mbedtls/files/mbedtls-2.19.1-zlib.patch
@@ -0,0 +1,29 @@
+From 9f25b8deff8e5b8fad8493db421b4639f14d2e5d Mon Sep 17 00:00:00 2001
+From: jiblime <47689567+jiblime@users.noreply.github.com>
+Date: Wed, 18 Dec 2019 21:40:01 -0800
+Subject: [PATCH] Fixes definition error when the deprecated
+ MBEDTLS_ZLIB_SUPPORT and ENABLE_ZLIB_SUPPORT macro are defined/enabled for
+ zlib support in mbedtls
+
+100% tests passed, 0 tests failed out of 85
+
+https://github.com/ARMmbed/mbedtls/blob/mbedtls-2.19.1/library/ssl_tls.c#L1842
+
+https://github.com/ARMmbed/mbedtls/blob/mbedtls-2.19.1/library/ssl_tls.c#L1862
+---
+ library/ssl_tls.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/library/ssl_tls.c b/library/ssl_tls.c
+index 6cf7781f2a..51ae9da3c6 100644
+--- a/library/ssl_tls.c
++++ b/library/ssl_tls.c
+@@ -1880,7 +1880,7 @@ int mbedtls_ssl_derive_keys( mbedtls_ssl_context *ssl )
+
+ /* Allocate compression buffer */
+ #if defined(MBEDTLS_ZLIB_SUPPORT)
+- if( session->compression == MBEDTLS_SSL_COMPRESS_DEFLATE &&
++ if( ssl->session_negotiate->compression == MBEDTLS_SSL_COMPRESS_DEFLATE &&
+ ssl->compress_buf == NULL )
+ {
+ MBEDTLS_SSL_DEBUG_MSG( 3, ( "Allocating compression buffer" ) );
diff --git a/net-libs/mbedtls/mbedtls-2.19.1-r2.ebuild b/net-libs/mbedtls/mbedtls-2.19.1-r2.ebuild
index a18fc891988..55ffc2164a7 100644
--- a/net-libs/mbedtls/mbedtls-2.19.1-r2.ebuild
+++ b/net-libs/mbedtls/mbedtls-2.19.1-r2.ebuild
@@ -39,6 +39,7 @@ enable_mbedtls_option() {
PATCHES=(
"${FILESDIR}"/${PN}-dont-overwrite-headers.patch
"${FILESDIR}"/${PN}-un-pebcak-705038-wrong-file.patch
+ "${FILESDIR}"/${PN}-2.19.1-zlib.patch #706112
)
src_prepare() {