fix(unzip): fix autoconf dir API probe to prevent false NO_DIR on modern compilers

This commit is contained in:
vxtls 2026-02-27 19:01:54 -05:00
parent 8300147e0f
commit bb2469202c

View file

@ -0,0 +1,15 @@
--- unzip60/unix/configure 2009-01-17 22:57:24
+++ unzip60/unix/configure 2026-02-27 21:12:00
@@ -418,7 +418,11 @@
echo Check for directory libraries
cat > conftest.c << _EOF_
-int main() { return closedir(opendir(".")); }
+#include <sys/types.h>
+#include <dirent.h>
+int main() {
+ return closedir(opendir("."));
+}
_EOF_
$CC -o conftest conftest.c >/dev/null 2>/dev/null