From 288cd1c74afc5ff2e28b9a45a76d2146da583903 Mon Sep 17 00:00:00 2001 From: Mark Weiman Date: Fri, 16 Apr 2021 23:45:23 -0400 Subject: Fix build error when SIGPOLL is not available On Linux, SIGPOLL is a valid signal, but on systems like FreeBSD, it is not. This patch does a preprocessor check to see if SIGPOLL is available or not. Signed-off-by: Mark Weiman Signed-off-by: Allan McRae --- lib/libalpm/util.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/libalpm') diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c index 46c1d0a1..299d287e 100644 --- a/lib/libalpm/util.c +++ b/lib/libalpm/util.c @@ -558,8 +558,12 @@ static void _alpm_reset_signals(void) int *i, signals[] = { SIGABRT, SIGALRM, SIGBUS, SIGCHLD, SIGCONT, SIGFPE, SIGHUP, SIGILL, SIGINT, SIGKILL, SIGPIPE, SIGQUIT, SIGSEGV, SIGSTOP, SIGTERM, SIGTSTP, - SIGTTIN, SIGTTOU, SIGUSR1, SIGUSR2, SIGPOLL, SIGPROF, SIGSYS, SIGTRAP, - SIGURG, SIGVTALRM, SIGXCPU, SIGXFSZ, + SIGTTIN, SIGTTOU, SIGUSR1, SIGUSR2, SIGPROF, SIGSYS, SIGTRAP, SIGURG, + SIGVTALRM, SIGXCPU, SIGXFSZ, +#if defined(SIGPOLL) + /* Not available on FreeBSD et al. */ + SIGPOLL, +#endif 0 }; struct sigaction def; -- cgit v1.2.3-70-g09d2