From: Guillem Jover Date: Sat, 1 Apr 2023 10:45:04 +0000 (+0200) Subject: Define _NSIG if it is not defined by the system X-Git-Tag: 0.11.8~40 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=06e8a1b29bea85fb3daeb1e3c7393bc78a8dffdb;p=thirdparty%2Flibbsd.git Define _NSIG if it is not defined by the system At least on macOS this macro is not defined. --- diff --git a/src/readpassphrase.c b/src/readpassphrase.c index f9f6195..0082c82 100644 --- a/src/readpassphrase.c +++ b/src/readpassphrase.c @@ -36,6 +36,15 @@ #define TCSASOFT 0 #endif +#ifndef _NSIG +#if defined(NSIG) +#define _NSIG NSIG +#else +/* The SIGRTMAX define might be set to a function such as sysconf(). */ +#define _NSIG (SIGRTMAX + 1) +#endif +#endif + static volatile sig_atomic_t signo[_NSIG]; static void handler(int);