* [Buildroot] [PATCH 1/1] package/glibc: add upstream patch to fix build error with glibc 2.43
@ 2026-05-01 17:14 Bernd Kuhls
2026-05-31 6:20 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 2+ messages in thread
From: Bernd Kuhls @ 2026-05-01 17:14 UTC (permalink / raw)
To: buildroot; +Cc: Romain Naour
Seen with this defconfig
BR2_x86_64=y
BR2_GCC_VERSION_15_X=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_PACKAGE_PICOTOOL=y
output/host/x86_64-buildroot-linux-gnu/sysroot/usr/include/bits/struct_mutex.h:35:9:
error: declaration does not declare anything [-fpermissive]
35 | short __unused;
No related autobuilder error was recorded.
The build error does not occur with glibc-2.42 on the 2026.02.x branch.
The build error was reported to picotool upstream:
https://github.com/raspberrypi/picotool/issues/300
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
...-__unused-fields-to-__glibc_reserved.patch | 85 +++++++++++++++++++
1 file changed, 85 insertions(+)
create mode 100644 package/glibc/0001-Rename-__unused-fields-to-__glibc_reserved.patch
diff --git a/package/glibc/0001-Rename-__unused-fields-to-__glibc_reserved.patch b/package/glibc/0001-Rename-__unused-fields-to-__glibc_reserved.patch
new file mode 100644
index 0000000000..5b7172df44
--- /dev/null
+++ b/package/glibc/0001-Rename-__unused-fields-to-__glibc_reserved.patch
@@ -0,0 +1,85 @@
+From 243bdfec8f7cd4a85a8ce6e4e9a5a5accd3ce1aa Mon Sep 17 00:00:00 2001
+From: Jakub Jelinek <jakub@redhat.com>
+Date: Tue, 17 Feb 2026 17:06:48 +0100
+Subject: [PATCH] Rename __unused fields to __glibc_reserved.
+
+__unused is often defined to __attribute__((unused)) in BSD
+sources and furthermore libstdc++ testsuite uses it as a macro
+to verify libstdc++ headers don't use __unused identifiers.
+In ~2012 glibc headers have been cleaned up, but some new
+uses of __unused have reappeared (s390 fenv.h already many
+years ago, the rest last November).
+
+Reviewed-by: Florian Weimer <fweimer@redhat.com>
+
+Upstream: https://sourceware.org/git/?p=glibc.git;a=commit;h=243bdfec8f7cd4a85a8ce6e4e9a5a5accd3ce1aa
+
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ sysdeps/powerpc/nptl/bits/struct_mutex.h | 2 +-
+ sysdeps/s390/fpu/bits/fenv.h | 8 ++++----
+ sysdeps/s390/nptl/bits/struct_mutex.h | 2 +-
+ sysdeps/x86/nptl/bits/struct_mutex.h | 2 +-
+ 4 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/sysdeps/powerpc/nptl/bits/struct_mutex.h b/sysdeps/powerpc/nptl/bits/struct_mutex.h
+index 1472af21f7..ebf2d50922 100644
+--- a/sysdeps/powerpc/nptl/bits/struct_mutex.h
++++ b/sysdeps/powerpc/nptl/bits/struct_mutex.h
+@@ -32,7 +32,7 @@ struct __pthread_mutex_s
+ int __kind;
+ #if __WORDSIZE == 64
+ short __spins;
+- short __unused;
++ short __glibc_reserved;
+ __pthread_list_t __list;
+ # define __PTHREAD_MUTEX_HAVE_PREV 1
+ #else
+diff --git a/sysdeps/s390/fpu/bits/fenv.h b/sysdeps/s390/fpu/bits/fenv.h
+index b9e844e393..33e88fbe9d 100644
+--- a/sysdeps/s390/fpu/bits/fenv.h
++++ b/sysdeps/s390/fpu/bits/fenv.h
+@@ -76,10 +76,10 @@ typedef unsigned int fexcept_t; /* size of fpc */
+ typedef struct
+ {
+ fexcept_t __fpc;
+- void *__unused;
+- /* The field __unused (formerly __ieee_instruction_pointer) is a relict from
+- commit "Remove PTRACE_PEEKUSER" (87b9b50f0d4b92248905e95a06a13c513dc45e59)
+- and isn't used anymore. */
++ void *__glibc_reserved;
++ /* The field __glibc_reserved (formerly __ieee_instruction_pointer) is a
++ relict from commit "Remove PTRACE_PEEKUSER"
++ (87b9b50f0d4b92248905e95a06a13c513dc45e59) and isn't used anymore. */
+ } fenv_t;
+
+ /* If the default argument is used we use this value. */
+diff --git a/sysdeps/s390/nptl/bits/struct_mutex.h b/sysdeps/s390/nptl/bits/struct_mutex.h
+index d069b485d1..571265267c 100644
+--- a/sysdeps/s390/nptl/bits/struct_mutex.h
++++ b/sysdeps/s390/nptl/bits/struct_mutex.h
+@@ -32,7 +32,7 @@ struct __pthread_mutex_s
+ int __kind;
+ #if __WORDSIZE == 64
+ short __spins;
+- short __unused;
++ short __glibc_reserved;
+ __pthread_list_t __list;
+ # define __PTHREAD_MUTEX_HAVE_PREV 1
+ #else
+diff --git a/sysdeps/x86/nptl/bits/struct_mutex.h b/sysdeps/x86/nptl/bits/struct_mutex.h
+index 9c19dff660..13c9894ad4 100644
+--- a/sysdeps/x86/nptl/bits/struct_mutex.h
++++ b/sysdeps/x86/nptl/bits/struct_mutex.h
+@@ -32,7 +32,7 @@ struct __pthread_mutex_s
+ int __kind;
+ #ifdef __x86_64__
+ short __spins;
+- short __unused;
++ short __glibc_reserved;
+ __pthread_list_t __list;
+ # define __PTHREAD_MUTEX_HAVE_PREV 1
+ #else
+--
+2.47.3
+
--
2.47.3
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-31 6:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-01 17:14 [Buildroot] [PATCH 1/1] package/glibc: add upstream patch to fix build error with glibc 2.43 Bernd Kuhls
2026-05-31 6:20 ` Thomas Petazzoni via buildroot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.