mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-02 06:03:50 +00:00
- Fix building of VM on i386 and amd64.
Reported by: QA Tindy
This commit is contained in:
parent
60431c17d6
commit
89bf0f4b17
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=218333
20
games/worldofpadman/files/patch-code__qcommon__vm_x86.c
Normal file
20
games/worldofpadman/files/patch-code__qcommon__vm_x86.c
Normal file
@ -0,0 +1,20 @@
|
||||
--- code/qcommon/vm_x86.c.orig 2007-10-30 12:26:20.000000000 -0300
|
||||
+++ code/qcommon/vm_x86.c 2008-08-10 11:36:02.000000000 -0300
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
/* need this on NX enabled systems (i386 with PAE kernel or
|
||||
* noexec32=on x86_64) */
|
||||
-#ifdef __linux__
|
||||
+#ifdef __unix__
|
||||
#define VM_X86_MMAP
|
||||
#endif
|
||||
|
||||
@@ -1079,7 +1079,7 @@
|
||||
// copy to an exact size buffer on the hunk
|
||||
vm->codeLength = compiledOfs;
|
||||
#ifdef VM_X86_MMAP
|
||||
- vm->codeBase = mmap(NULL, compiledOfs, PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0);
|
||||
+ vm->codeBase = mmap(NULL, compiledOfs, PROT_WRITE, MAP_SHARED|MAP_ANON, -1, 0);
|
||||
if(vm->codeBase == (void*)-1)
|
||||
Com_Error(ERR_DROP, "VM_CompileX86: can't mmap memory");
|
||||
#elif _WIN32
|
11
games/worldofpadman/files/patch-code__qcommon__vm_x86_64.c
Normal file
11
games/worldofpadman/files/patch-code__qcommon__vm_x86_64.c
Normal file
@ -0,0 +1,11 @@
|
||||
--- code/qcommon/vm_x86_64.c.orig 2008-05-10 10:05:55.000000000 -0300
|
||||
+++ code/qcommon/vm_x86_64.c 2008-08-10 11:36:11.000000000 -0300
|
||||
@@ -534,7 +534,7 @@
|
||||
{
|
||||
compiledOfs = assembler_get_code_size();
|
||||
vm->codeLength = compiledOfs;
|
||||
- vm->codeBase = mmap(NULL, compiledOfs, PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0);
|
||||
+ vm->codeBase = mmap(NULL, compiledOfs, PROT_WRITE, MAP_SHARED|MAP_ANON, -1, 0);
|
||||
if(vm->codeBase == (void*)-1)
|
||||
Com_Error(ERR_DROP, "VM_CompileX86: can't mmap memory");
|
||||
|
Loading…
Reference in New Issue
Block a user