zip: fetch build fix from debian

(cherry picked from commit 0642347f9d)
This commit is contained in:
Julian Stecklina
2026-08-17 14:39:01 +02:00
committed by github-actions[bot]
parent 9c8cbb57c5
commit 0304419df8
2 changed files with 7 additions and 59 deletions

View File

@@ -1,56 +0,0 @@
From: Santiago Vila <sanvila@debian.org>
Subject: Fix build with gcc-14
Bug-Debian: https://bugs.debian.org/1075706
X-Debian-version: 3.0-14
--- a/unix/configure
+++ b/unix/configure
@@ -514,14 +514,16 @@
echo Check for $func
echo "int main(){ $func(); return 0; }" > conftest.c
$CC $BFLAG -o conftest conftest.c >/dev/null 2>/dev/null
- [ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_`echo $func | tr '[a-z]' '[A-Z]'`"
+# glibc-based systems do not need this
+# [ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_`echo $func | tr '[a-z]' '[A-Z]'`"
done
echo Check for memset
echo "int main(){ char k; memset(&k,0,0); return 0; }" > conftest.c
$CC -o conftest conftest.c >/dev/null 2>/dev/null
-[ $? -ne 0 ] && CFLAGS="${CFLAGS} -DZMEM"
+# glibc-based systems do not need this
+# [ $? -ne 0 ] && CFLAGS="${CFLAGS} -DZMEM"
echo Check for memmove
@@ -551,7 +553,8 @@
}
_EOF_
$CC $CFLAGS -c conftest.c >/dev/null 2>/dev/null
-[ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_ERRNO"
+# glibc-based systems do not need this
+# [ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_ERRNO"
echo Check for directory libraries
@@ -567,7 +570,8 @@
$CC -o conftest conftest.c -l$lib >/dev/null 2>/dev/null
[ $? -eq 0 ] && OPT=-l$lib && break
done
- if [ ${OPT} ]; then
+ # glibc-based systems do not need this
+ if true; then
LFLAGS2="${LFLAGS2} ${OPT}"
else
CFLAGS="${CFLAGS} -DNO_DIR"
@@ -629,7 +633,8 @@
}
_EOF_
$CC ${CFLAGS} -c conftest.c > /dev/null 2>/dev/null
-[ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_VALLOC"
+# glibc-based systems do not need this
+# [ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_VALLOC"
echo Check for /usr/local/bin and /usr/local/man

View File

@@ -6,6 +6,7 @@
libnatspec ? null,
libiconv,
fetchpatch,
fetchDebianPatch,
}:
assert enableNLS -> libnatspec != null;
@@ -46,9 +47,12 @@ stdenv.mkDerivation (finalAttrs: {
# zip I/O error: No such file or directory
# zip error: Could not create output file (was replacing the original zip file)
# make[2]: *** [CreateJars.gmk:659: /build/source/build/linux-x86_64-normal-server-release/images/src.zip] Error 1
#
# Source: Debian
./12-fix-build-with-gcc-14.patch
(fetchDebianPatch {
inherit (finalAttrs) pname version;
debianRevision = "16";
patch = "fix-build-with-gcc-14.patch";
hash = "sha256-C966AdPV5E44cJ1L28iFvmXq3frjNiW6PoHiOOusS04=";
})
(fetchpatch {
url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/app-arch/zip/files/zip-3.0-pic.patch?id=d37d095fc7a2a9e4a8e904a7bf0f597fe99df85a";
hash = "sha256-OXgC9KqiOpH/o/bSabt3LqtoT/xifqfkvpLLPfPz+1c=";