Skip to content

Commit b1545db

Browse files
committed
apparmor: fix build failure on sparc caused by undeclared signals
In file included from security/apparmor/ipc.c:23:0: security/apparmor/include/sig_names.h:26:3: error: 'SIGSTKFLT' undeclared here (not in a function) [SIGSTKFLT] = 16, /* -, 16, - */ ^ security/apparmor/include/sig_names.h:26:3: error: array index in initializer not of integer type security/apparmor/include/sig_names.h:26:3: note: (near initialization for 'sig_map') security/apparmor/include/sig_names.h:51:3: error: 'SIGUNUSED' undeclared here (not in a function) [SIGUNUSED] = 34, /* -, 31, - */ ^ security/apparmor/include/sig_names.h:51:3: error: array index in initializer not of integer type security/apparmor/include/sig_names.h:51:3: note: (near initialization for 'sig_map') Reported-by: Stephen Rothwell <[email protected]> Fixes: c6bf1ad ("apparmor: add the ability to mediate signals") Signed-off-by: John Johansen <[email protected]>
1 parent bc4d82f commit b1545db

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

security/apparmor/include/sig_names.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ static const int sig_map[MAXMAPPED_SIG] = {
2323
[SIGPIPE] = 13,
2424
[SIGALRM] = 14,
2525
[SIGTERM] = 15,
26+
#ifdef SIGSTKFLT
2627
[SIGSTKFLT] = 16, /* -, 16, - */
28+
#endif
2729
[SIGCHLD] = 17, /* 20, 17, 18. SIGCHLD -, -, 18 */
2830
[SIGCONT] = 18, /* 19, 18, 25 */
2931
[SIGSTOP] = 19, /* 17, 19, 23 */
@@ -47,7 +49,8 @@ static const int sig_map[MAXMAPPED_SIG] = {
4749
#if defined(SIGLOST) && SIGPWR != SIGLOST /* sparc */
4850
[SIGLOST] = 33, /* unused on Linux */
4951
#endif
50-
#if defined(SIGLOST) && defined(SIGSYS) && SIGLOST != SIGSYS
52+
#if defined(SIGUNUSED) && \
53+
defined(SIGLOST) && defined(SIGSYS) && SIGLOST != SIGSYS
5154
[SIGUNUSED] = 34, /* -, 31, - */
5255
#endif
5356
};

0 commit comments

Comments
 (0)