diff options
Diffstat (limited to 'wasm2c/examples/fac/fac.c')
-rw-r--r-- | wasm2c/examples/fac/fac.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/wasm2c/examples/fac/fac.c b/wasm2c/examples/fac/fac.c index 970abbe1..683c5d80 100644 --- a/wasm2c/examples/fac/fac.c +++ b/wasm2c/examples/fac/fac.c @@ -4,10 +4,14 @@ #include <stdarg.h> #include <stddef.h> #include <string.h> -#if defined(_MSC_VER) +#if defined(__MINGW32__) +#include <malloc.h> +#elif defined(_MSC_VER) #include <intrin.h> #include <malloc.h> #define alloca _alloca +#elif defined(__FreeBSD__) || defined(__OpenBSD__) +#include <stdlib.h> #else #include <alloca.h> #endif |