From b5f33ba76f9657228746e079eafb8fa952a9ab8b Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Tue, 19 Dec 2023 02:55:24 +0000 Subject: [PATCH] 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`. --- signal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/signal.c b/signal.c index 35ec892f2f711d..bef3b2e5375232 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);