From 5a32a00f46c911b06785daff794c8003fc8aeec0 Mon Sep 17 00:00:00 2001 From: dzaima Date: Sun, 12 Jun 2022 22:12:08 +0300 Subject: [PATCH] more checks of NO_MMAP --- src/utils/file.c | 2 +- src/vm.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/file.c b/src/utils/file.c index d0bf7846..0542e5ca 100644 --- a/src/utils/file.c +++ b/src/utils/file.c @@ -223,7 +223,7 @@ B path_list(B path) { return res; } -#if __has_include() && __has_include() && __has_include() && __has_include() && !WASM +#if __has_include() && __has_include() && __has_include() && __has_include() && !WASM && !NO_MMAP #include #include diff --git a/src/vm.c b/src/vm.c index f106f8c1..0526e53b 100644 --- a/src/vm.c +++ b/src/vm.c @@ -1056,7 +1056,7 @@ static void allocStack(void** curr, void** start, void** end, i32 elSize, i32 co #endif *curr = *start = mem; *end = ((char*)*start)+sz; - #if !WASM + #if !WASM && !NO_MMAP mprotect(*end, ps, PROT_NONE); // idk first way i found to force erroring on overflow #endif }