aboutsummaryrefslogtreecommitdiffstats
path: root/signal.c
diff options
context:
space:
mode:
authorYuta Saito <kateinoigakukun@gmail.com>2023-12-19 02:55:24 +0000
committerYuta Saito <kateinoigakukun@gmail.com>2023-12-19 12:40:43 +0900
commitb5f33ba76f9657228746e079eafb8fa952a9ab8b (patch)
tree7fd7ac5d5906c3428f3cc0449063f8a7d1abc36d /signal.c
parentf907a7111c5fd26f54c0e020dd64d6325c3fd08b (diff)
downloadruby-b5f33ba76f9657228746e079eafb8fa952a9ab8b.tar.gz
signal.c: Fix undefined `reset_sigmask` use on Emscripten
3c471149910d79745b50389c436f0ed2973e0d91 added a call to `reset_sigmask` but the guard condition didn't match with the condition used to define `reset_sigmask`.
Diffstat (limited to 'signal.c')
-rw-r--r--signal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/signal.c b/signal.c
index 35ec892f2f..bef3b2e537 100644
--- a/signal.c
+++ b/signal.c
@@ -403,7 +403,7 @@ interrupt_init(int argc, VALUE *argv, VALUE self)
}
void rb_malloc_info_show_results(void); /* gc.c */
-#ifdef POSIX_SIGNAL
+#if defined(USE_SIGALTSTACK) || defined(_WIN32)
static void reset_sigmask(int sig);
#endif
@@ -416,7 +416,7 @@ ruby_default_signal(int sig)
rb_malloc_info_show_results();
signal(sig, SIG_DFL);
-#ifdef POSIX_SIGNAL
+#if defined(USE_SIGALTSTACK) || defined(_WIN32)
reset_sigmask(sig);
#endif
raise(sig);