From: Paweł Owoc Date: Sun, 2 Aug 2026 06:51:39 +0000 (+0200) Subject: tools: elfutils: fix uio header inclusion X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;p=thirdparty%2Fopenwrt.git tools: elfutils: fix uio header inclusion Fixes arm64 build failures by replacing with POSIX to avoid header redefinition conflicts. gnulib's fcntl.h ends up including glibc's fcntl.h and fcntl-linux.h which includes glibc's types/struct_iovec.h, thats where the redefinition happens. the lines that use are antiquated and were never necessary. it can be traced back to the original 2014 change that added the file with aarch64 support in upstream commit 66637fa21044ac0058b25522f473669e73de328b it was never necessary to use the linux header over the glibc headers, as elfutils only needs the iovec struct and that struct was present since glibc 2.0 in the 1990s Signed-off-by: Paweł Owoc Link: https://github.com/openwrt/openwrt/pull/24539 Signed-off-by: Robert Marko --- diff --git a/tools/elfutils/patches/006-Fix-build-on-aarch64-musl.patch b/tools/elfutils/patches/006-Fix-build-on-aarch64-musl.patch new file mode 100644 index 00000000000..f47f4ff2f78 --- /dev/null +++ b/tools/elfutils/patches/006-Fix-build-on-aarch64-musl.patch @@ -0,0 +1,44 @@ +From 578f370c7e7a9f056aefa062b34590b0aa13bce5 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Tue, 15 Aug 2017 17:27:30 +0800 +Subject: [PATCH] Fix build on aarch64/musl + +Errors + +error: redefinition + of 'struct iovec' + struct iovec { void *iov_base; size_t iov_len; }; + ^ +Upstream-Status: Pending +Signed-off-by: Khem Raj + +Rebase to 0.170 +Signed-off-by: Hongxu Jia + +--- + backends/aarch64_initreg.c | 2 +- + backends/arm_initreg.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +--- a/backends/aarch64_initreg.c ++++ b/backends/aarch64_initreg.c +@@ -33,7 +33,7 @@ + #include "system.h" + #include + #if defined(__aarch64__) && defined(__linux__) +-# include ++# include + # include + # include + # include +--- a/backends/arm_initreg.c ++++ b/backends/arm_initreg.c +@@ -38,7 +38,7 @@ + #endif + + #ifdef __aarch64__ +-# include ++# include + # include + # include + /* Deal with old glibc defining user_pt_regs instead of user_regs_struct. */