]> granicus.if.org Git - procps-ng/commitdiff
library: Don't use SIGPWR on FreeBSD
authorJon Boden <jon@ubuntubsd.org>
Sun, 28 Aug 2016 09:19:05 +0000 (19:19 +1000)
committerCraig Small <csmall@enc.com.au>
Sun, 28 Aug 2016 09:19:05 +0000 (19:19 +1000)
FreeBSD doesn't have SIGPWR so makes no sense in warning and assuming
its 29.

Picked from master, but the file has moved from proc/sig.c to
library/signals.c

References:
 commit 8abd0c92ab7576280b2a601c12ff749ab41c117f
 https://bugs.debian/org/832148

Signed-off-by: Craig Small <csmall@enc.com.au>
lib/signals.c

index b466c4543d4962285b9228de5b1dc553ab76d067..f10ed1e5116aa999dbe9bc996550b56101dc249f 100644 (file)
@@ -56,7 +56,7 @@
 #endif
 
 /* It seems the SPARC libc does not know the kernel supports SIGPWR. */
-#ifndef SIGPWR
+#if defined(__linux__) && !defined(SIGPWR)
 #  warning Your header files lack SIGPWR. (assuming it is number 29)
 #  define SIGPWR 29
 #endif
@@ -84,7 +84,9 @@ static const mapstruct sigtable[] = {
   {"PIPE",   SIGPIPE},
   {"POLL",   SIGPOLL},  /* IO */
   {"PROF",   SIGPROF},
+#ifdef SIGPWR
   {"PWR",    SIGPWR},
+#endif
   {"QUIT",   SIGQUIT},
   {"SEGV",   SIGSEGV},
 #ifdef SIGSTKFLT