Merge branch 'mesa_7_5_branch'
[mesa.git] / src / mesa / main / execmem.c
index b40a2de8fa42bc5dbfc7480bbe50e3d77a0681a1..57c1e117c89063d95cd6222847b86276e9c46892 100644 (file)
@@ -24,7 +24,7 @@
 
 
 /**
- * \file exemem.c
+ * \file execmem.c
  * Functions for allocating executable memory.
  *
  * \author Keith Whitwell
@@ -36,7 +36,7 @@
 
 
 
-#if defined(__linux__)
+#if defined(__linux__) || defined(__OpenBSD__) || defined(_NetBSD__) || defined(__sun)
 
 /*
  * 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);