macOS: Fix support for Apple hardened runtime.

Reported by Christian Clason. #1334
This commit is contained in:
Mike Pall 2025-03-10 00:05:08 +01:00
parent 7db2d1b12a
commit e3c70a7d81

View File

@ -138,7 +138,7 @@ static void mcode_free(jit_State *J, void *p, size_t sz)
static int mcode_setprot(void *p, size_t sz, int prot) static int mcode_setprot(void *p, size_t sz, int prot)
{ {
#if MCMAP_CREATE #if MCMAP_CREATE
pthread_jit_write_protect_np((prot & PROC_EXEC)); pthread_jit_write_protect_np((prot & PROT_EXEC));
return 0; return 0;
#else #else
return mprotect(p, sz, prot); return mprotect(p, sz, prot);