diff --git a/eval_intern.h b/eval_intern.h index 266a84601e..347453f4e8 100644 --- a/eval_intern.h +++ b/eval_intern.h @@ -33,7 +33,11 @@ pass_passed_block_handler(rb_execution_context_t *ec) #endif #include -#include +#if defined(__wasm__) && !defined(__EMSCRIPTEN__) +# include "wasm/setjmp.h" +#else +# include +#endif #ifdef __APPLE__ # ifdef HAVE_CRT_EXTERNS_H diff --git a/gc.c b/gc.c index aca15ad426..0d5a1336b3 100644 --- a/gc.c +++ b/gc.c @@ -28,7 +28,11 @@ #include #endif -#include +#if defined(__wasm__) && !defined(__EMSCRIPTEN__) +# include "wasm/setjmp.h" +#else +# include +#endif #include #include diff --git a/vm_core.h b/vm_core.h index 11866b85e5..12f563df17 100644 --- a/vm_core.h +++ b/vm_core.h @@ -62,7 +62,11 @@ #define VM_UNREACHABLE(func) UNREACHABLE #endif -#include +#if defined(__wasm__) && !defined(__EMSCRIPTEN__) +# include "wasm/setjmp.h" +#else +# include +#endif #include "ruby/internal/stdbool.h" #include "ccan/list/list.h"