[pacman-dev] [PATCH 4/4] Fix build error when SIGPOLL is not available
Andrew Gregory
andrew.gregory.8 at gmail.com
Fri Apr 16 20:08:56 UTC 2021
On 04/16/21 at 03:42pm, Mark Weiman wrote:
> On Linux, SIGPOLL is a valid signal, but on systems like FreeBSD, it is
> not. This patch adds a detection within meson.build to check if it's
> available, and if not, make sure it's not included.
>
> Signed-off-by: Mark Weiman <mark.weiman at markzz.com>
> ---
> lib/libalpm/util.c | 6 +++++-
> meson.build | 13 +++++++++++++
> 2 files changed, 18 insertions(+), 1 deletion(-)
>
> diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
> index d2a688a2..db07502a 100644
> --- a/lib/libalpm/util.c
> +++ b/lib/libalpm/util.c
> @@ -561,7 +561,11 @@ 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,
> + SIGTTIN, SIGTTOU, SIGUSR1, SIGUSR2,
> +#if defined(HAVE_SIGPOLL)
> + SIGPOLL,
> +#endif
> + SIGPROF, SIGSYS, SIGTRAP,
> SIGURG, SIGVTALRM, SIGXCPU, SIGXFSZ,
SIGPOLL is a macro, just check for it directly. For the sake of
readability, leave the other three signals on the line they're already
on and put SIGPOLL at the end. Please also add a comment that this is
for FreeBSD so we don't forget and revert it in the future.
More information about the pacman-dev
mailing list