Another try to fix build in emscripten

malloc_trim is defined in emscripten/emmalloc.h on emscripten.
This commit is contained in:
Peter Zhu 2023-09-16 13:24:41 -04:00
parent 25711683e8
commit 4aac7b1a9a

5
gc.c
View File

@ -62,6 +62,11 @@
#ifdef HAVE_MALLOC_TRIM
# include <malloc.h>
# ifdef __EMSCRIPTEN__
/* malloc_trim is defined in emscripten/emmalloc.h on emscripten. */
# include <emscripten/emmalloc.h>
# endif
#endif
#if !defined(PAGE_SIZE) && defined(HAVE_SYS_USER_H)