Skip to content

Commit

Permalink
Fix q3vm execution on x86/x86_64 MacOSX
Browse files Browse the repository at this point in the history
  • Loading branch information
Thilo Schulz committed Sep 27, 2011
1 parent 7a1f2bc commit ebec84c
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions code/qcommon/vm_x86.c
Expand Up @@ -24,21 +24,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);
Expand Down

0 comments on commit ebec84c

Please sign in to comment.