aboutsummaryrefslogtreecommitdiff
path: root/games/worldofpadman
diff options
context:
space:
mode:
authorAlejandro Pulver <alepulver@FreeBSD.org>2008-08-10 14:44:03 +0000
committerAlejandro Pulver <alepulver@FreeBSD.org>2008-08-10 14:44:03 +0000
commit89bf0f4b179f8c896b06e969ed97d4102b1ce904 (patch)
tree1b3c459f52792a14858ba7c805f388a5d6fba6de /games/worldofpadman
parent60431c17d6febc43b7713b32efd9f81984afa198 (diff)
downloadports-89bf0f4b179f8c896b06e969ed97d4102b1ce904.tar.gz
ports-89bf0f4b179f8c896b06e969ed97d4102b1ce904.zip
- Fix building of VM on i386 and amd64.
Reported by: QA Tindy
Notes
Notes: svn path=/head/; revision=218333
Diffstat (limited to 'games/worldofpadman')
-rw-r--r--games/worldofpadman/files/patch-code__qcommon__vm_x86.c20
-rw-r--r--games/worldofpadman/files/patch-code__qcommon__vm_x86_64.c11
2 files changed, 31 insertions, 0 deletions
diff --git a/games/worldofpadman/files/patch-code__qcommon__vm_x86.c b/games/worldofpadman/files/patch-code__qcommon__vm_x86.c
new file mode 100644
index 000000000000..071fbedb9723
--- /dev/null
+++ b/games/worldofpadman/files/patch-code__qcommon__vm_x86.c
@@ -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
diff --git a/games/worldofpadman/files/patch-code__qcommon__vm_x86_64.c b/games/worldofpadman/files/patch-code__qcommon__vm_x86_64.c
new file mode 100644
index 000000000000..c5e215cb7000
--- /dev/null
+++ b/games/worldofpadman/files/patch-code__qcommon__vm_x86_64.c
@@ -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");
+