Skip to content

Commit 23de01c

Browse files
[wasm] eval_inter.h gc.c vm_core.h: include wasm/setjmp.h instead of sysroot header
1 parent a4b73f1 commit 23de01c

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

eval_intern.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ pass_passed_block_handler(rb_execution_context_t *ec)
3333
#endif
3434

3535
#include <stdio.h>
36-
#include <setjmp.h>
36+
#if defined(__wasm__) && !defined(__EMSCRIPTEN__)
37+
# include "wasm/setjmp.h"
38+
#else
39+
# include <setjmp.h>
40+
#endif
3741

3842
#ifdef __APPLE__
3943
# ifdef HAVE_CRT_EXTERNS_H

gc.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@
2828
#include <sys/mman.h>
2929
#endif
3030

31-
#include <setjmp.h>
31+
#if defined(__wasm__) && !defined(__EMSCRIPTEN__)
32+
# include "wasm/setjmp.h"
33+
#else
34+
# include <setjmp.h>
35+
#endif
3236
#include <stdarg.h>
3337
#include <stdio.h>
3438

vm_core.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,11 @@
6262
#define VM_UNREACHABLE(func) UNREACHABLE
6363
#endif
6464

65-
#include <setjmp.h>
65+
#if defined(__wasm__) && !defined(__EMSCRIPTEN__)
66+
# include "wasm/setjmp.h"
67+
#else
68+
# include <setjmp.h>
69+
#endif
6670

6771
#include "ruby/internal/stdbool.h"
6872
#include "ccan/list/list.h"

0 commit comments

Comments
 (0)