Merge commit 'origin/gallium-0.1' into gallium-0.2
[mesa.git] / src / mesa / main / execmem.c
index b40a2de8fa42bc5dbfc7480bbe50e3d77a0681a1..f95c31862a5e2510659098f67e3b083409af08d8 100644 (file)
@@ -36,7 +36,7 @@
 
 
 
-#if defined(__linux__)
+#if defined(__linux__) || defined(__OpenBSD__) || defined(_NetBSD__)
 
 /*
  * Allocate a large block of memory which can hold code then dole it out
 #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);