From 7d96b51fbc8b0df8ebf348de2aa5f2058254ed93 Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Mon, 9 Jan 2006 02:16:46 +0000 Subject: * Merged ioq3-468 --- src/qcommon/vm_x86_64.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/qcommon') 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; } -- cgit