aboutsummaryrefslogtreecommitdiff
path: root/openssl/agent/pkcs11/agent.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'openssl/agent/pkcs11/agent.cxx')
-rw-r--r--openssl/agent/pkcs11/agent.cxx18
1 files changed, 15 insertions, 3 deletions
diff --git a/openssl/agent/pkcs11/agent.cxx b/openssl/agent/pkcs11/agent.cxx
index 8655bdf..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()
@@ -15,7 +29,7 @@
#include <iostream> // cout
-#include <libbutl/pager.mxx>
+#include <libbutl/pager.hxx>
#include <openssl/protocol.hxx>
#include <openssl/diagnostics.hxx>
@@ -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