Files
openwrt_yocto/poky/meta/recipes-extended/zip/zip-3.0/0001-configure-Include-dirent.h-for-closedir-opendir-APIs.patch
francis.wang 4c86c082a2 Initial commit: OpenWrt-Yocto monorepo
Combine poky (Yocto scarthgap), meta-openembedded (scarthgap), and
meta-openwrt into a single repository.

Components:
- poky/             Yocto core framework (BitBake + OE-Core)
- meta-openembedded/ Community layers (meta-oe, meta-python, meta-networking)
- meta-openwrt/     OpenWrt customization layer
- setup-env.sh      One-click build environment setup
- README.md         Project documentation
2026-07-11 13:28:01 +08:00

46 lines
1.4 KiB
Diff
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
From 9db2f8cdbbc0dfb359d3b4e5dfe48c18652ce531 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 8 May 2024 19:02:46 -0700
Subject: [PATCH] configure: Include dirent.h for closedir/opendir APIs
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
GCC-14 is strict about function prototypes and since the
testcase tries to compile/link opendir/closedir functions
without including signatures, it fails to build the test
due to missing signatures which come from dirent.h
Therefore include the needed system header and make it more
robust.
Fixes
a.c:2:21: error: implicit declaration of function closedir [-Wimplicit-function-declaration]
2 | int main() { return closedir(opendir(".")); }
| ^~~~~~~~
a.c:2:30: error: implicit declaration of function opendir [-Wimplicit-function-declaration]
2 | int main() { return closedir(opendir(".")); }
| ^~~~~~~
Upstream-Status: Inactive-Upstream
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
unix/configure | 1 +
1 file changed, 1 insertion(+)
diff --git a/unix/configure b/unix/configure
index f917086..1dd98c6 100644
--- a/unix/configure
+++ b/unix/configure
@@ -591,6 +591,7 @@ $CC $CFLAGS -c conftest.c >/dev/null 2>/dev/null
echo Check for directory libraries
cat > conftest.c << _EOF_
+#include <dirent.h>
int main() { return closedir(opendir(".")); }
_EOF_
--
2.45.0