summaryrefslogtreecommitdiff
path: root/src/qcommon
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2006-01-09 02:16:46 +0000
committerTim Angus <tim@ngus.net>2006-01-09 02:16:46 +0000
commit7d96b51fbc8b0df8ebf348de2aa5f2058254ed93 (patch)
tree1b13c58efb4f469e4cae5f000bc7e2d2e4b680fc /src/qcommon
parentdc6118816aa49c9b1e6dd82e6c6504f2153c37df (diff)
* Merged ioq3-468
Diffstat (limited to 'src/qcommon')
-rw-r--r--src/qcommon/vm_x86_64.c5
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;
}