summaryrefslogtreecommitdiff
path: root/src/mesa/main/execmem.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/execmem.c')
-rw-r--r--src/mesa/main/execmem.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/main/execmem.c b/src/mesa/main/execmem.c
index df3095232d..072b046c0a 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,11 @@
#include <sys/mman.h>
#include "mm.h"
+#ifndef MAP_ANONYMOUS
+#define MAP_ANONYMOUS MAP_ANON
+#endif
+
+
#define EXEC_HEAP_SIZE (10*1024*1024)
_glthread_DECLARE_STATIC_MUTEX(exec_mutex);