remove has_siginfo

and wrap siginfo behind #ifdef SIGINFO.  avoids some warnings in !BSD.
This commit is contained in:
Omar Polo 2023-06-11 11:36:31 +00:00
parent 1ef09e6313
commit 237095fd9a
1 changed files with 4 additions and 3 deletions

View File

@ -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