diff options
Diffstat (limited to 'src/qcommon')
-rw-r--r-- | src/qcommon/vm_x86_64.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/qcommon/vm_x86_64.c b/src/qcommon/vm_x86_64.c index e8545b9f..23f87c30 100644 --- a/src/qcommon/vm_x86_64.c +++ b/src/qcommon/vm_x86_64.c @@ -386,12 +386,11 @@ static int doas(char* in, char* out, unsigned char** compiledcode) if((*compiledcode = (unsigned char*)buf)) { -#ifdef VM_X86_64_STANDALONE // no idea why - if(mprotect(buf, allocsize, PROT_READ|PROT_EXEC) == -1) + // need to be able to exec code + if(mprotect(buf, allocsize, PROT_READ|PROT_WRITE|PROT_EXEC) == -1) { Com_Error(ERR_FATAL, "mprotect failed on %p+%x: %s\n", buf, allocsize, strerror(errno)); } -#endif return size; } |