From 237095fd9a40120ef4e4bb7b7525d45c89c6cfb0 Mon Sep 17 00:00:00 2001 From: Omar Polo Date: Sun, 11 Jun 2023 11:36:31 +0000 Subject: [PATCH] remove has_siginfo and wrap siginfo behind #ifdef SIGINFO. avoids some warnings in !BSD. --- server.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server.c b/server.c index 5048212..79fcc15 100644 --- a/server.c +++ b/server.c @@ -41,8 +41,10 @@ int shutting_down; static struct tls *ctx; -static struct event siginfo, sigusr2; -static int has_siginfo; +#ifdef SIGINFO +static struct event siginfo; +#endif +static struct event sigusr2; int connected_clients; @@ -1463,7 +1465,6 @@ server_init(struct privsep *ps, struct privsep_proc *p, void *arg) SPLAY_INIT(&clients); #ifdef SIGINFO - has_siginfo = 1; signal_set(&siginfo, SIGINFO, &handle_siginfo, NULL); signal_add(&siginfo, NULL); #endif