summaryrefslogtreecommitdiffstats
path: root/archive-libs
diff options
context:
space:
mode:
authorIsmael Luceno2021-01-20 18:06:46 +0100
committerIsmael Luceno2021-01-21 00:45:58 +0100
commitbd2e82657a05f27b9e2ba7427c28e09367a1d708 (patch)
treee9afa4829838e48cbf7361d9f27a223fe91369ea /archive-libs
parentbe2ab2533d9d19a08a9673a04cefd813953041ef (diff)
libzip: Fix build against musl
Diffstat (limited to 'archive-libs')
-rw-r--r--archive-libs/libzip/HISTORY4
-rwxr-xr-xarchive-libs/libzip/PRE_BUILD3
-rw-r--r--archive-libs/libzip/patches/0001-portability-fixes.patch17
3 files changed, 24 insertions, 0 deletions
diff --git a/archive-libs/libzip/HISTORY b/archive-libs/libzip/HISTORY
index 68c4a67dc9..2ee6a56263 100644
--- a/archive-libs/libzip/HISTORY
+++ b/archive-libs/libzip/HISTORY
@@ -1,3 +1,7 @@
+2021-01-20 Ismael Luceno <ismael@iodev.co.uk>
+ * PRE_BUILD, patches/0001-portability-fixes.patch:
+ fixed build against musl
+
2020-07-17 Florian Franzmann <siflfran@hawo.stw.uni-erlangen.de>
* DETAILS: version 1.7.3
diff --git a/archive-libs/libzip/PRE_BUILD b/archive-libs/libzip/PRE_BUILD
new file mode 100755
index 0000000000..c230ad14bf
--- /dev/null
+++ b/archive-libs/libzip/PRE_BUILD
@@ -0,0 +1,3 @@
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+apply_patch_dir patches
diff --git a/archive-libs/libzip/patches/0001-portability-fixes.patch b/archive-libs/libzip/patches/0001-portability-fixes.patch
new file mode 100644
index 0000000000..d4848ec6cb
--- /dev/null
+++ b/archive-libs/libzip/patches/0001-portability-fixes.patch
@@ -0,0 +1,17 @@
+Fix missing header inclusion
+
+INT_MAX is defined in <limits.h>; which isn't necessarily included by other of
+the used headers, so in some libc implementations this causes a build error.
+
+diff --git a/lib/zip_crypto_openssl.c.orig b/lib/zip_crypto_openssl.c
+index 1cb004798b1c..74c1d87bc36c 100644
+--- a/lib/zip_crypto_openssl.c
++++ b/lib/zip_crypto_openssl.c
+@@ -31,6 +31,7 @@
+ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
++#include <limits.h>
+ #include <stdlib.h>
+
+ #include "zipint.h"