commit:     19c3e94aa0d6f570381cd5f57e13c0e7925077c0
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 21 16:45:11 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Jul 21 17:32:07 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=19c3e94a

dev-libs/libzip: Add missing limits.h includes

Thanks-to: Reuben Farrelly <reuben-gentoo-bugzilla <AT> reub.net>
Closes: https://bugs.gentoo.org/733326
Package-Manager: Portage-3.0.0, Repoman-2.3.23
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../libzip/files/libzip-1.7.3-missing-header.patch | 43 ++++++++++++++++++++++
 dev-libs/libzip/libzip-1.7.3.ebuild                |  2 +
 2 files changed, 45 insertions(+)

diff --git a/dev-libs/libzip/files/libzip-1.7.3-missing-header.patch 
b/dev-libs/libzip/files/libzip-1.7.3-missing-header.patch
new file mode 100644
index 00000000000..bebe3802841
--- /dev/null
+++ b/dev-libs/libzip/files/libzip-1.7.3-missing-header.patch
@@ -0,0 +1,43 @@
+From fd89e242d16128dedef08f47d99ae56aa19b0591 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C3=98rjan=20Malde?= <[email protected]>
+Date: Wed, 15 Jul 2020 12:16:16 +0200
+Subject: [PATCH] Include limits.h for INT_MAX
+
+---
+ lib/zip_crypto_openssl.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/lib/zip_crypto_openssl.c b/lib/zip_crypto_openssl.c
+index 1cb00479..60f92758 100644
+--- a/lib/zip_crypto_openssl.c
++++ b/lib/zip_crypto_openssl.c
+@@ -38,6 +38,7 @@
+ #include "zip_crypto.h"
+ 
+ #include <openssl/rand.h>
++#include <limits.h>
+ 
+ #if OPENSSL_VERSION_NUMBER < 0x1010000fL || defined(LIBRESSL_VERSION_NUMBER)
+ #define USE_OPENSSL_1_0_API
+
+From b4a4f778806fe2c3ca9ec57c0411a8dcf462e655 Mon Sep 17 00:00:00 2001
+From: Thomas Klausner <[email protected]>
+Date: Wed, 15 Jul 2020 12:38:07 +0200
+Subject: [PATCH] Include limits.h for INT_MAX.
+
+---
+ lib/zip_crypto_mbedtls.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/lib/zip_crypto_mbedtls.c b/lib/zip_crypto_mbedtls.c
+index c348ad2a..7063c6b6 100644
+--- a/lib/zip_crypto_mbedtls.c
++++ b/lib/zip_crypto_mbedtls.c
+@@ -41,6 +41,7 @@
+ #include <mbedtls/entropy.h>
+ #include <mbedtls/pkcs5.h>
+ 
++#include <limits.h>
+ 
+ _zip_crypto_aes_t *
+ _zip_crypto_aes_new(const zip_uint8_t *key, zip_uint16_t key_size, 
zip_error_t *error) {

diff --git a/dev-libs/libzip/libzip-1.7.3.ebuild 
b/dev-libs/libzip/libzip-1.7.3.ebuild
index 8edc5a80ac6..1f81a4ee336 100644
--- a/dev-libs/libzip/libzip-1.7.3.ebuild
+++ b/dev-libs/libzip/libzip-1.7.3.ebuild
@@ -37,6 +37,8 @@ DEPEND="
 "
 RDEPEND="${DEPEND}"
 
+PATCHES=( "${FILESDIR}"/${P}-missing-header.patch ) # bug 733326
+
 pkg_setup() {
        # Upstream doesn't support building dynamic & static
        # simultaneously: https://github.com/nih-at/libzip/issues/76

Reply via email to