From d255d8cd0d71bb2e306b25bab57fad31b4d6bbd7 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sun, 2 Nov 2025 17:24:30 +0100 Subject: init: fix build of the signal handler part for archs without SA_RESTORER Some archs (e.g. mips) don't use it. It seems sufficient to simply not set the flag nor the restorer, as verified under strace. We don't need much anyway since the only purpose is to exit. --- init/init.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/init/init.c b/init/init.c index 5cb1042..06c834f 100644 --- a/init/init.c +++ b/init/init.c @@ -2334,8 +2334,10 @@ static void enable_signals(void) sigset_t blk = { 0 }; #ifdef NOLIBC +#ifdef SA_RESTORER act.sa_flags = SA_RESTORER; act.sa_restorer = sig_return; +#endif act.sa_handler = sig_handler; my_syscall4(__NR_rt_sigaction, SIGTERM, &act, NULL, sizeof(sigset_t)); -- 2.17.5