On 7/5/24 21:54, Thorsten Glaser wrote:
Maybe sigset_t needs to be removed from
klibc/include/arch/parisc/klibc/archsignal.h ?

That (with a versioned Depends on the newer kernel headers)
or with a #if LINUX_VERSION_CODE < KERNEL_VERSION(6, 9, 0)
(which will end up causing similar hassle should the change
be backported to stable kernels).

Attached patch fixes the klibc build for me on hppa.
I think it's the cleanest way forwared, as it builds with
new and old kernels.
Could you please apply it to the next upload?

Thanks,
Helge
[PATCH] klibc/hppa: Fix sigset_t typedef

The sigset_t typedef was added to Linux kernel v6.9 with this commit:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=487fa28fa8b60417642ac58e8beda6e2509d18f9

The reason was, that the util-linux debian package failed to build on parisc,
because sigset_t wasn't defined in asm/signal.h when included from userspace.
Note that all other platforms had sigset_t defined in asm/signal.h, so the
solution was to move the sigset_t type from an internal header to the uapi
header.

This Kernel change breaks sigset_t in klibc, which is why this patch now
conditionally defines sigset_t depending if _NSIG_WORDS is defined.

Signed-off-by: Helge Deller <del...@gmx.de>

diff -up ./usr/include/arch/parisc/klibc/archsignal.h.org ./usr/include/arch/parisc/klibc/archsignal.h
--- ./usr/include/arch/parisc/klibc/archsignal.h.org	2024-07-05 21:21:26.047846414 +0000
+++ ./usr/include/arch/parisc/klibc/archsignal.h	2024-07-06 08:01:39.960873549 +0000
@@ -9,12 +9,14 @@
 #define _KLIBC_ARCHSIGNAL_H
 
 #include <asm/signal.h>
-#define _NSIG    64
-#define _NSIG_SZ (_NSIG / LONG_BIT)
 
+#ifndef _NSIG_WORDS
+#define _NSIG           64
+#define _NSIG_WORDS     (_NSIG / LONG_BIT)
 typedef struct {
-	unsigned long sig[_NSIG_SZ];
+	unsigned long sig[_NSIG_WORDS];
 } sigset_t;
+#endif
 
 struct sigaction {
 	__sighandler_t	sa_handler;

Reply via email to