From c731f01067b8f5004e5953172c0003545f190c2e Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Sat, 3 Dec 2022 12:10:22 -0600 Subject: [PATCH] Address windows compilation warning. --- src/core/ffi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/ffi.c b/src/core/ffi.c index d463b697..48e0e569 100644 --- a/src/core/ffi.c +++ b/src/core/ffi.c @@ -240,7 +240,7 @@ static JanetByteView janet_ffijit_getbytes(void *p, size_t s) { JanetFFIJittedFn *fn = p; JanetByteView bytes; bytes.bytes = fn->function_pointer; - bytes.len = fn->size; + bytes.len = (int32_t) fn->size; return bytes; } @@ -1299,6 +1299,7 @@ JANET_CORE_FN(cfun_ffi_jitfn, void *ptr = mmap(0, bytes.len, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0); #else /* -std=c99 gets in the way */ + /* #define MAP_ANONYMOUS 0x20 should work, though. */ void *ptr = mmap(0, bytes.len, PROT_READ | PROT_WRITE, MAP_PRIVATE, -1, 0); #endif if (!ptr) {