From 4d36a1d37d826006b9832f1aabea4c9cd5104a3d Mon Sep 17 00:00:00 2001 From: Cheng Shao Date: Fri, 21 Oct 2022 14:09:07 +0000 Subject: rts: don't define RTS_USER_SIGNALS when signal.h is not present In the rts, we have a RTS_USER_SIGNALS macro, and most signal-related logic is guarded with RTS_USER_SIGNALS. This patch extends the range of code guarded with RTS_USER_SIGNALS, and define RTS_USER_SIGNALS iff signal.h is actually detected by autoconf. This is required for wasm32-wasi to work, which lacks signals. --- rts/RtsStartup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rts/RtsStartup.c') diff --git a/rts/RtsStartup.c b/rts/RtsStartup.c index 5b0cc9f712..46749163dc 100644 --- a/rts/RtsStartup.c +++ b/rts/RtsStartup.c @@ -659,7 +659,7 @@ shutdownHaskellAndExit(int n, int fastExit) stg_exit(n); } -#if !defined(mingw32_HOST_OS) +#if !defined(mingw32_HOST_OS) && defined(HAVE_SIGNAL_H) static void exitBySignal(int sig) STG_NORETURN; void -- cgit v1.2.1