From 723b7d31bd5f913cc57e832b35c46ce86b282dc8 Mon Sep 17 00:00:00 2001 From: Sam James Date: Tue, 22 Sep 2026 03:26:36 +0100 Subject: [PATCH] app-arch/gzip: fix build on arm64 Closes: https://bugs.gentoo.org/983039 Signed-off-by: Sam James --- app-arch/gzip/files/gzip-1.15-arm64.patch | 42 +++++++++++++++++++++++ app-arch/gzip/gzip-1.15.ebuild | 1 + 2 files changed, 43 insertions(+) create mode 100644 app-arch/gzip/files/gzip-1.15-arm64.patch diff --git a/app-arch/gzip/files/gzip-1.15-arm64.patch b/app-arch/gzip/files/gzip-1.15-arm64.patch new file mode 100644 index 0000000000000..678dd8fc52dd8 --- /dev/null +++ b/app-arch/gzip/files/gzip-1.15-arm64.patch @@ -0,0 +1,42 @@ +https://bugs.gentoo.org/983039 +https://cgit.git.savannah.gnu.org/cgit/gzip.git/commit/?id=b4ed8e73401968bcad749afb0e636dd3ec205ca7 + +From b4ed8e73401968bcad749afb0e636dd3ec205ca7 Mon Sep 17 00:00:00 2001 +From: Jim Meyering +Date: Mon, 21 Sep 2026 01:42:18 -0700 +Subject: build: avoid failure to build on linux aarch64 + +* gzip.c: Include gzip.h only after all system headers. +gzip.h's "head" definition affected a subsequent signal.h- +included system struct member named "head". +Reported by Adam Sampson in https://bugs.gnu.org/81904 +--- + gzip.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/gzip.c b/gzip.c +index 220f6fc..6c0af7f 100644 +--- a/gzip.c ++++ b/gzip.c +@@ -58,7 +58,6 @@ static char const license_msg[] = + + #include "tailor.h" + +-#include "gzip.h" + #include "lzw.h" + #include "revision.h" + #include "version.h" +@@ -99,6 +98,11 @@ static char const license_msg[] = + # include + #endif + ++/* Include this only after all system headers. Otherwise, its definition ++ of "head" conflicts with member names in linux-headers 7.2.6's ++ asm/sigcontext.h pulled in via . */ ++#include "gzip.h" ++ + #ifndef MAX_PATH_LEN + # define MAX_PATH_LEN 1024 /* max pathname length */ + #endif +-- +cgit v1.3 diff --git a/app-arch/gzip/gzip-1.15.ebuild b/app-arch/gzip/gzip-1.15.ebuild index 293925644200e..62d7c2ea0b712 100644 --- a/app-arch/gzip/gzip-1.15.ebuild +++ b/app-arch/gzip/gzip-1.15.ebuild @@ -45,6 +45,7 @@ PDEPEND=" PATCHES=( "${FILESDIR}/${PN}-1.3.8-install-symlinks.patch" + "${FILESDIR}/${P}-arm64.patch" ) src_configure() {