Fix q3vm execution on x86/x86_64 MacOSX

This commit is contained in:
Thilo Schulz 2011-09-27 01:38:13 +00:00
parent 7a1f2bc92b
commit ebec84c55d

View file

@ -24,21 +24,22 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "vm_local.h" #include "vm_local.h"
#ifdef _WIN32 #ifdef _WIN32
#include <windows.h> #include <windows.h>
#endif #else
#ifdef __FreeBSD__
#include <sys/types.h>
#endif
#ifdef __FreeBSD__ #include <sys/mman.h> // for PROT_ stuff
#include <sys/types.h>
#endif
#ifndef _WIN32 /* need this on NX enabled systems (i386 with PAE kernel or
#include <sys/mman.h> // for PROT_ stuff * noexec32=on x86_64) */
#endif #define VM_X86_MMAP
/* need this on NX enabled systems (i386 with PAE kernel or // workaround for systems that use the old MAP_ANON macro
* noexec32=on x86_64) */ #ifndef MAP_ANONYMOUS
#if defined(__linux__) || defined(__FreeBSD__) #define MAP_ANONYMOUS MAP_ANON
#define VM_X86_MMAP #endif
#endif #endif
static void VM_Destroy_Compiled(vm_t* self); static void VM_Destroy_Compiled(vm_t* self);