]> git.ipfire.org Git - thirdparty/libbsd.git/commitdiff
Define _NSIG if it is not defined by the system
authorGuillem Jover <guillem@hadrons.org>
Sat, 1 Apr 2023 10:45:04 +0000 (12:45 +0200)
committerGuillem Jover <guillem@hadrons.org>
Mon, 17 Apr 2023 02:12:42 +0000 (04:12 +0200)
At least on macOS this macro is not defined.

src/readpassphrase.c

index f9f61950d17436f5550c2426701e5d22557eb642..0082c82cfb89e9044650db6365bec06cac5eeaaf 100644 (file)
 #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);