aboutsummaryrefslogtreecommitdiff
path: root/openssl
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2023-02-10 12:02:47 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2023-02-10 12:02:47 +0200
commit3e8ab07d25da1310db86cfca7e18eb0ad1987c8d (patch)
tree17367f65947ac2ba7fc121f4f24fb0f23a3bd08c /openssl
parente9618132afa2b43e9ff71c1d0a46f4d962db8352 (diff)
Make buildable on *BSD
Diffstat (limited to 'openssl')
-rw-r--r--openssl/agent/pkcs11/agent.cxx16
1 files changed, 14 insertions, 2 deletions
diff --git a/openssl/agent/pkcs11/agent.cxx b/openssl/agent/pkcs11/agent.cxx
index 8d61208..273414e 100644
--- a/openssl/agent/pkcs11/agent.cxx
+++ b/openssl/agent/pkcs11/agent.cxx
@@ -6,6 +6,20 @@
#include <sys/socket.h>
#include <signal.h> // kill(), sigaction(), sigemptyset(), SIG*
+
+// _NSIG is Linux-specific but *BSD appear to have NSIG/_NSIG.
+//
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
+# include <sys/signal.h>
+# ifndef _NSIG
+# ifdef NSIG
+# define _NSIG NSIG
+# else
+# error neither _NSIG nor NSIG defined
+# endif
+# endif
+#endif
+
#include <unistd.h> // fork(), getpid(), dup2(), setsid()
#include <termios.h> // tcgetattr(), tcsetattr()
@@ -235,8 +249,6 @@ namespace openssl
// future versions. Thus, we will provide our own implementation of the
// function that is inspired by the openssh implementation.
//
- // Note: _NSIG is Linux-specic.
- //
static volatile sig_atomic_t received_signals[_NSIG];
extern "C" void