summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/zip
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/zip')
-rw-r--r--meta/recipes-extended/zip/zip-3.0/0001-configure-Include-dirent.h-for-closedir-opendir-APIs.patch45
-rw-r--r--meta/recipes-extended/zip/zip-3.0/0002-unix.c-Do-not-redefine-DIR-as-FILE.patch35
-rw-r--r--meta/recipes-extended/zip/zip_3.0.bb2
3 files changed, 46 insertions, 36 deletions
diff --git a/meta/recipes-extended/zip/zip-3.0/0001-configure-Include-dirent.h-for-closedir-opendir-APIs.patch b/meta/recipes-extended/zip/zip-3.0/0001-configure-Include-dirent.h-for-closedir-opendir-APIs.patch
new file mode 100644
index 0000000000..0d3af37ded
--- /dev/null
+++ b/meta/recipes-extended/zip/zip-3.0/0001-configure-Include-dirent.h-for-closedir-opendir-APIs.patch
@@ -0,0 +1,45 @@
1From 9db2f8cdbbc0dfb359d3b4e5dfe48c18652ce531 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 8 May 2024 19:02:46 -0700
4Subject: [PATCH] configure: Include dirent.h for closedir/opendir APIs
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9GCC-14 is strict about function prototypes and since the
10testcase tries to compile/link opendir/closedir functions
11without including signatures, it fails to build the test
12due to missing signatures which come from dirent.h
13
14Therefore include the needed system header and make it more
15robust.
16
17Fixes
18a.c:2:21: error: implicit declaration of function ‘closedir’ [-Wimplicit-function-declaration]
19 2 | int main() { return closedir(opendir(".")); }
20 | ^~~~~~~~
21a.c:2:30: error: implicit declaration of function ‘opendir’ [-Wimplicit-function-declaration]
22 2 | int main() { return closedir(opendir(".")); }
23 | ^~~~~~~
24
25Upstream-Status: Inactive-Upstream
26Signed-off-by: Khem Raj <raj.khem@gmail.com>
27---
28 unix/configure | 1 +
29 1 file changed, 1 insertion(+)
30
31diff --git a/unix/configure b/unix/configure
32index f917086..1dd98c6 100644
33--- a/unix/configure
34+++ b/unix/configure
35@@ -591,6 +591,7 @@ $CC $CFLAGS -c conftest.c >/dev/null 2>/dev/null
36
37 echo Check for directory libraries
38 cat > conftest.c << _EOF_
39+#include <dirent.h>
40 int main() { return closedir(opendir(".")); }
41 _EOF_
42
43--
442.45.0
45
diff --git a/meta/recipes-extended/zip/zip-3.0/0002-unix.c-Do-not-redefine-DIR-as-FILE.patch b/meta/recipes-extended/zip/zip-3.0/0002-unix.c-Do-not-redefine-DIR-as-FILE.patch
deleted file mode 100644
index a86e03e620..0000000000
--- a/meta/recipes-extended/zip/zip-3.0/0002-unix.c-Do-not-redefine-DIR-as-FILE.patch
+++ /dev/null
@@ -1,35 +0,0 @@
1From 76f5bf3546d826dcbc03acbefcf0b10b972bf136 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 10 Aug 2022 17:19:38 -0700
4Subject: [PATCH 2/2] unix.c: Do not redefine DIR as FILE
5
6DIR is already provided on Linux via
7/usr/include/dirent.h system header
8
9Upstream-Status: Inactive-Upstream
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 unix/unix.c | 2 --
13 1 file changed, 2 deletions(-)
14
15diff --git a/unix/unix.c b/unix/unix.c
16index ba87614..6e6f4d2 100644
17--- a/unix/unix.c
18+++ b/unix/unix.c
19@@ -61,13 +61,11 @@ local time_t label_utim = 0;
20 /* Local functions */
21 local char *readd OF((DIR *));
22
23-
24 #ifdef NO_DIR /* for AT&T 3B1 */
25 #include <sys/dir.h>
26 #ifndef dirent
27 # define dirent direct
28 #endif
29-typedef FILE DIR;
30 /*
31 ** Apparently originally by Rich Salz.
32 ** Cleaned up and modified by James W. Birdsall.
33--
342.37.1
35
diff --git a/meta/recipes-extended/zip/zip_3.0.bb b/meta/recipes-extended/zip/zip_3.0.bb
index 70df5ab872..ec54206335 100644
--- a/meta/recipes-extended/zip/zip_3.0.bb
+++ b/meta/recipes-extended/zip/zip_3.0.bb
@@ -17,8 +17,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/infozip/Zip%203.x%20%28latest%29/3.0/zip30.tar.
17 file://0002-configure-support-PIC-code-build.patch \ 17 file://0002-configure-support-PIC-code-build.patch \
18 file://0001-configure-Use-CFLAGS-and-LDFLAGS-when-doing-link-tes.patch \ 18 file://0001-configure-Use-CFLAGS-and-LDFLAGS-when-doing-link-tes.patch \
19 file://0001-configure-Specify-correct-function-signatures-and-de.patch \ 19 file://0001-configure-Specify-correct-function-signatures-and-de.patch \
20 file://0002-unix.c-Do-not-redefine-DIR-as-FILE.patch \
21 file://0001-unix-configure-use-_Static_assert-to-do-correct-dete.patch \ 20 file://0001-unix-configure-use-_Static_assert-to-do-correct-dete.patch \
21 file://0001-configure-Include-dirent.h-for-closedir-opendir-APIs.patch \
22 " 22 "
23UPSTREAM_VERSION_UNKNOWN = "1" 23UPSTREAM_VERSION_UNKNOWN = "1"
24 24