kernel: guard include of signal.h more precisely.
authorwhitequark <whitequark@whitequark.org>
Sat, 13 Jun 2020 22:37:04 +0000 (22:37 +0000)
committerwhitequark <whitequark@whitequark.org>
Sat, 13 Jun 2020 22:37:04 +0000 (22:37 +0000)
Upgrading to WASI SDK 11.0 caused the WASM build to fail because WASM
does not have signals. (Arguably Yosys was broken even before, it was
just broken silently.)

kernel/log.h

index 516744b50e94b9e32bf834c85bf5b53e289e25af..63590c4891b3a1ea5c551f2fc23f43715c421b34 100644 (file)
@@ -55,7 +55,9 @@
 #else
 #  include <sys/time.h>
 #  include <sys/resource.h>
-#  include <signal.h>
+#  if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
+#    include <signal.h>
+#  endif
 #endif
 
 #if defined(_MSC_VER)