diff options
author | ChanTsune <41658782+ChanTsune@users.noreply.github.com> | 2023-08-01 18:17:17 +0300 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2023-08-01 18:18:05 +0300 |
commit | 81db3b889830132334d1f2129bdc93177ac2ca7d (patch) | |
tree | ee9be3ffa704626959ed46a93a296613d8906fdf /src | |
parent | Add newline to end of .gitignore. (diff) | |
download | xz-81db3b889830132334d1f2129bdc93177ac2ca7d.tar.xz |
mythread.h: Disable signal functions in builds targeting Wasm + WASI.
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: https://github.com/tukaani-project/xz/pull/57
See also: https://github.com/tukaani-project/xz/pull/56
(The original commit was edited a little by Lasse Collin.)
Diffstat (limited to 'src')
-rw-r--r-- | src/common/mythread.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/mythread.h b/src/common/mythread.h index 7a80f966..1cce50e9 100644 --- a/src/common/mythread.h +++ b/src/common/mythread.h @@ -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> |