Skip to content

Commit

Permalink
mythread.h: Disable signal functions in builds targeting Wasm + WASI.
Browse files Browse the repository at this point in the history
signal.h in WASI SDK doesn't currently provide sigprocmask()
or sigset_t. liblzma doesn't need them so this change makes
liblzma and xzdec build against WASI SDK. xz doesn't build yet
and the tests don't either as tuktest needs setjmp() which
isn't (yet?) implemented in WASI SDK.

Closes: #57
See also: #56

(The original commit was edited a little by Lasse Collin.)
  • Loading branch information
ChanTsune authored and Larhzu committed Aug 1, 2023
1 parent 71c638c commit 81db3b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/mythread.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ do { \
} while (0)


#if !(defined(_WIN32) && !defined(__CYGWIN__))
#if !(defined(_WIN32) && !defined(__CYGWIN__)) && !defined(__wasm__)
// Use sigprocmask() to set the signal mask in single-threaded programs.
#include <signal.h>

Expand Down

0 comments on commit 81db3b8

Please sign in to comment.