Define __SIGRTMIN and __SIGRTMAX for MUSL
PATCH 1/1 Define __SIGRTMIN and __SIGRTMAX for MUSL
Some libc implementations might differ in the definitions they include. Exempli gratia: MUSL does not define __SIGRTMAX nor __SIGRTMIN.
These two tests fail to build because of the missing definitions:
testcases/kernel/syscalls/ptrace/ptrace05.c testcases/kernel/syscalls/sighold/sighold02.c
Out of precaution, these two also include this header:
lib/tst_sig.c testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c
--- include/lapi/signal.h | 24 +++++++++++++++++++ lib/tst_sig.c | 1 + testcases/kernel/syscalls/ptrace/ptrace05.c | 1 + .../syscalls/rt_sigsuspend/rt_sigsuspend01.c | 1 + testcases/kernel/syscalls/sighold/sighold02.c | 1 + 5 files changed, 28 insertions(+) create mode 100644 include/lapi/signal.h
include/lapi/signal.h new file +24 -0
@@ -0,0 +1,24 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* +* Copyright (c) 2019 Linaro Limited. All rights reserved. +* Author: Daniel Díaz <[email protected]> +*/ + +#ifndef LAPI_SIGNAL_H +#define LAPI_SIGNAL_H + +#include <signal.h> + +/* +* Some libc implementations might differ in the definitions they include. This +* covers those differences for all tests to successfully build. +*/ + +#ifndef __SIGRTMIN +# define __SIGRTMIN 32 +#endif +#ifndef __SIGRTMAX +# define __SIGRTMAX (_NSIG - 1) +#endif + +#endif
lib/tst_sig.c +1 -0
@@ -72,6 +72,7 @@#include <signal.h> #include <unistd.h> #include "test.h" +#include "lapi/signal.h" #define MAXMESG 150/* size of mesg string sent to tst_res */
testcases/kernel/syscalls/ptrace/ptrace05.c +1 -0
@@ -38,6 +38,7 @@#include "ptrace.h" #include "test.h" +#include "lapi/signal.h" char *TCID ="ptrace05" ;int TST_TOTAL =0 ;
testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c +1 -0
@@ -18,6 +18,7 @@#include "tst_test.h" #include "lapi/syscalls.h" #include "lapi/safe_rt_signal.h" +#include "lapi/signal.h" static void sig_handler (int sig) {
testcases/kernel/syscalls/sighold/sighold02.c +1 -0
@@ -49,6 +49,7 @@#include <sys/wait.h> #include "test.h" #include "safe_macros.h" +#include "lapi/signal.h" /* _XOPEN_SOURCE disables NSIG */ #ifndef NSIG
Signature · 1 line
2.17.1
PATCH 1/1 Define __SIGRTMIN and __SIGRTMAX for MUSL
Hi Daniel,
Quoted 4 lines
Some libc implementations might differ in the definitions they include. Exempli gratia: MUSL does not define
__SIGRTMAXnor__SIGRTMIN.
Quoted 8 lines
These two tests fail to build because of the missing definitions:
testcases/kernel/syscalls/ptrace/ptrace05.ctestcases/kernel/syscalls/sighold/sighold02.cOut of precaution, these two also include this header:
lib/tst_sig.ctestcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c
Thanks, merged!
Kind regards,
Petr