summaryrefslogtreecommitdiffstats
path: root/mbbsd/osdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd/osdep.c')
-rw-r--r--mbbsd/osdep.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/mbbsd/osdep.c b/mbbsd/osdep.c
index e7852177..1bca7208 100644
--- a/mbbsd/osdep.c
+++ b/mbbsd/osdep.c
@@ -380,6 +380,24 @@ inet_pton(int af, const char *src, void *dst)
}
#endif
+#ifdef NEED_BSD_SIGNAL
+
+void (*bsd_signal(int sig, void (*func)(int)))(int)
+{
+ struct sigaction act, oact;
+
+ act.sa_handler = func;
+ act.sa_flags = SA_RESTART;
+ sigemptyset(&act.sa_mask);
+ sigaddset(&act.sa_mask, sig);
+ if (sigaction(sig, &act, &oact) == -1)
+ return(SIG_ERR);
+ return(oact.sa_handler);
+}
+
+
+#endif
+
#ifdef Solaris