summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-07-09 08:48:41 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-07-09 08:48:41 -0600
commit520dbdea22442493771763a3a895f9e9039c2a5c (patch)
treef9cdd0c5f58648dae72ce52d1ed2c5b19ca86111 /src/mesa/main
parent57f2d071d1503823867029e4d672c09e6417cc68 (diff)
downloadexternal_mesa3d-520dbdea22442493771763a3a895f9e9039c2a5c.zip
external_mesa3d-520dbdea22442493771763a3a895f9e9039c2a5c.tar.gz
external_mesa3d-520dbdea22442493771763a3a895f9e9039c2a5c.tar.bz2
mesa: check for OpenBSD (bug 15604)
cherry-picked from master
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/execmem.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/mesa/main/execmem.c b/src/mesa/main/execmem.c
index 40f66d7..aa40b02 100644
--- a/src/mesa/main/execmem.c
+++ b/src/mesa/main/execmem.c
@@ -36,7 +36,7 @@
-#if defined(__linux__)
+#if defined(__linux__) || defined(__OpenBSD__)
/*
* Allocate a large block of memory which can hold code then dole it out
@@ -47,6 +47,16 @@
#include <sys/mman.h>
#include "mm.h"
+#ifdef MESA_SELINUX
+#include <selinux/selinux.h>
+#endif
+
+
+#ifndef MAP_ANONYMOUS
+#define MAP_ANONYMOUS MAP_ANON
+#endif
+
+
#define EXEC_HEAP_SIZE (10*1024*1024)
_glthread_DECLARE_STATIC_MUTEX(exec_mutex);