From 3a77931d5f95c8e374f48edec353e4965be40097 Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Thu, 13 Jun 2024 12:46:14 +0900 Subject: [PATCH] Fix Werrors with GCC-14.1.0 Change-Id: Ice11e341e5dcf9c12f253731f7be69a6090bff06 --- packaging/fix_for_unix_build.patch | 26 ++++++++++++++++++++++++++ packaging/unzip.spec | 2 ++ 2 files changed, 28 insertions(+) create mode 100644 packaging/fix_for_unix_build.patch diff --git a/packaging/fix_for_unix_build.patch b/packaging/fix_for_unix_build.patch new file mode 100644 index 0000000..f74064e --- /dev/null +++ b/packaging/fix_for_unix_build.patch @@ -0,0 +1,26 @@ +diff --git a/unix/Makefile b/unix/Makefile +index f01d812..36022fc 100644 +--- a/unix/Makefile ++++ b/unix/Makefile +@@ -361,7 +361,7 @@ CC = cc + CC_BZ = $(CC) + + CF_NOOPT = -I. -DUNIX $(LOCAL_UNZIP) +-CFLAGS = -O3 -fPIC ++CFLAGS = -O3 -fPIC -Wno-implicit-function-declaration + CF = $(CFLAGS) $(CF_NOOPT) # C compiler flags (core components) + CF_BZ = $(CF) # C compiler flags (BZIP2 components) + +diff --git a/unix/configure b/unix/configure +index 38974c5..a4d472d 100755 +--- a/unix/configure ++++ b/unix/configure +@@ -2355,6 +2355,8 @@ fi + # Check for directory traversal libraries (ndir, dirent, bsd, ...). + echon 'Check for directory traversal libraries...' + cat > conftest.c << _EOF_ ++#include ++#include + int main() { return closedir(opendir(".")); } + _EOF_ + $CC_TST $CFLAGS -o conftest conftest.c >/dev/null 2>/dev/null diff --git a/packaging/unzip.spec b/packaging/unzip.spec index 86282c2..f714d81 100644 --- a/packaging/unzip.spec +++ b/packaging/unzip.spec @@ -8,6 +8,7 @@ Group: Applications/Archiving Source: unzip%{version}.tar.gz Source1: 0001-d-option-is-able-to-accept-root-directory.patch Source2: fix_for_CVE-2016-3189.patch +Source3: fix_for_unix_build.patch Source1001: unzip.manifest %description @@ -26,6 +27,7 @@ a zip archive. cp %{SOURCE1001} . %{__patch} -p1 < %{SOURCE1} %{__patch} -p1 < %{SOURCE2} +%{__patch} -p1 < %{SOURCE3} ln -s unix/Makefile Makefile %build -- 2.7.4