diff --git a/gc.c b/gc.c index a1e6bc4bc2..ad4cd55b2a 100644 --- a/gc.c +++ b/gc.c @@ -3996,6 +3996,11 @@ init_mark_stack(mark_stack_t *stack) #define STACK_END (ec->machine.stack_end) #define STACK_LEVEL_MAX (ec->machine.stack_maxsize/sizeof(VALUE)) +#ifdef __EMSCRIPTEN__ +#undef STACK_GROW_DIRECTION +#define STACK_GROW_DIRECTION 1 +#endif + #if STACK_GROW_DIRECTION < 0 # define STACK_LENGTH (size_t)(STACK_START - STACK_END) #elif STACK_GROW_DIRECTION > 0