summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThilo Schulz <arny@ats.s.bawue.de>2011-09-27 01:38:13 +0000
committerTim Angus <tim@ngus.net>2013-01-10 23:38:28 +0000
commited1e20af481fd6fdb5dc8d1dc025586e4bf59129 (patch)
tree85ba7ebef1615177bac05754f42a4d27027c505f
parente89e23a8b29e3d2205d2bf8c7c38de93542a47e6 (diff)
Fix q3vm execution on x86/x86_64 MacOSX
-rw-r--r--src/qcommon/vm_x86.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/qcommon/vm_x86.c b/src/qcommon/vm_x86.c
index b1b84e40..ef912729 100644
--- a/src/qcommon/vm_x86.c
+++ b/src/qcommon/vm_x86.c
@@ -25,21 +25,22 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "vm_local.h"
#ifdef _WIN32
-#include <windows.h>
-#endif
-
-#ifdef __FreeBSD__
-#include <sys/types.h>
-#endif
+ #include <windows.h>
+#else
+ #ifdef __FreeBSD__
+ #include <sys/types.h>
+ #endif
-#ifndef _WIN32
-#include <sys/mman.h> // for PROT_ stuff
-#endif
+ #include <sys/mman.h> // for PROT_ stuff
-/* need this on NX enabled systems (i386 with PAE kernel or
- * noexec32=on x86_64) */
-#if defined(__linux__) || defined(__FreeBSD__)
-#define VM_X86_MMAP
+ /* need this on NX enabled systems (i386 with PAE kernel or
+ * noexec32=on x86_64) */
+ #define VM_X86_MMAP
+
+ // workaround for systems that use the old MAP_ANON macro
+ #ifndef MAP_ANONYMOUS
+ #define MAP_ANONYMOUS MAP_ANON
+ #endif
#endif
static void VM_Destroy_Compiled(vm_t* self);