init: do not fail build if SIGPWR is not defined
authorMichael Tokarev <mjt@tls.msk.ru>
Wed, 29 Jan 2014 08:40:32 +0000 (12:40 +0400)
committerDenys Vlasenko <vda.linux@googlemail.com>
Thu, 30 Jan 2014 12:22:04 +0000 (13:22 +0100)
Apparently, some *BSD variants (and maybe some other OSes) does not define
SIGPWR signal.  So since commit 760fc6debcba8c, busybox fails to build on
such platforms.  Fix this.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
init/init.c

index d29328c36f9a801af03a5ff403746fe9c41c74a0..de438be20551755099bf12be2e9c09fea60bdb35 100644 (file)
@@ -1135,7 +1135,9 @@ int init_main(int argc UNUSED_PARAM, char **argv)
                struct sigaction sa;
 
                bb_signals(0
+#ifdef SIGPWR
                        + (1 << SIGPWR)  /* halt */
+#endif
                        + (1 << SIGUSR1) /* halt */
                        + (1 << SIGTERM) /* reboot */
                        + (1 << SIGUSR2) /* poweroff */