1
0
Fork 0
mirror of https://git.tukaani.org/xz.git synced 2024-04-04 12:36:23 +02:00

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.)
This commit is contained in:
ChanTsune 2023-08-01 18:17:17 +03:00 committed by Lasse Collin
parent 0db6fbe0be
commit 4170a80785

View file

@ -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>