summaryrefslogtreecommitdiff
path: root/signal.c
diff options
context:
space:
mode:
Diffstat (limited to 'signal.c')
-rw-r--r--signal.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/signal.c b/signal.c
index bd0313bfdd..b76044c625 100644
--- a/signal.c
+++ b/signal.c
@@ -463,7 +463,11 @@ ruby_signal(int signum, sighandler_t handler)
sigact.sa_flags |= SA_NOCLDWAIT;
#endif
#if defined(SA_ONSTACK) && defined(USE_SIGALTSTACK)
- if (signum == SIGSEGV || signum == SIGBUS)
+ if (signum == SIGSEGV
+#ifdef SIGBUS
+ || signum == SIGBUS
+#endif
+ )
sigact.sa_flags |= SA_ONSTACK;
#endif
if (sigaction(signum, &sigact, &old) < 0) {