summaryrefslogtreecommitdiff
path: root/rts/RtsSignals.h
diff options
context:
space:
mode:
authorCheng Shao <astrohavoc@gmail.com>2022-10-21 14:09:07 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-11-11 00:26:55 -0500
commit4d36a1d37d826006b9832f1aabea4c9cd5104a3d (patch)
tree3f579c851c1ae28c248187e16c2cfc5c990e8777 /rts/RtsSignals.h
parentd72466a9fdb2e65196b5d243495cadd68bb07aa2 (diff)
downloadhaskell-4d36a1d37d826006b9832f1aabea4c9cd5104a3d.tar.gz
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.
Diffstat (limited to 'rts/RtsSignals.h')
-rw-r--r--rts/RtsSignals.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/rts/RtsSignals.h b/rts/RtsSignals.h
index b0add6727d..c143737474 100644
--- a/rts/RtsSignals.h
+++ b/rts/RtsSignals.h
@@ -8,7 +8,7 @@
#pragma once
-#if !defined(mingw32_HOST_OS)
+#if !defined(mingw32_HOST_OS) && defined(HAVE_SIGNAL_H)
#include "posix/Signals.h"
@@ -22,7 +22,7 @@
#endif
-#if RTS_USER_SIGNALS
+#if defined(RTS_USER_SIGNALS)
#include "BeginPrivate.h"