summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/zip/zip-3.0/0001-configure-Include-dirent.h-for-closedir-opendir-APIs.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/zip/zip-3.0/0001-configure-Include-dirent.h-for-closedir-opendir-APIs.patch')
-rw-r--r--meta/recipes-extended/zip/zip-3.0/0001-configure-Include-dirent.h-for-closedir-opendir-APIs.patch45
1 files changed, 45 insertions, 0 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