diff options
-rw-r--r-- | eval_intern.h | 6 | ||||
-rw-r--r-- | gc.c | 6 | ||||
-rw-r--r-- | vm_core.h | 6 |
3 files changed, 15 insertions, 3 deletions
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 <stdio.h> -#include <setjmp.h> +#if defined(__wasm__) && !defined(__EMSCRIPTEN__) +# include "wasm/setjmp.h" +#else +# include <setjmp.h> +#endif #ifdef __APPLE__ # ifdef HAVE_CRT_EXTERNS_H @@ -28,7 +28,11 @@ #include <sys/mman.h> #endif -#include <setjmp.h> +#if defined(__wasm__) && !defined(__EMSCRIPTEN__) +# include "wasm/setjmp.h" +#else +# include <setjmp.h> +#endif #include <stdarg.h> #include <stdio.h> @@ -62,7 +62,11 @@ #define VM_UNREACHABLE(func) UNREACHABLE #endif -#include <setjmp.h> +#if defined(__wasm__) && !defined(__EMSCRIPTEN__) +# include "wasm/setjmp.h" +#else +# include <setjmp.h> +#endif #include "ruby/internal/stdbool.h" #include "ccan/list/list.h" |