summaryrefslogtreecommitdiff
path: root/lib/mesa/src/mapi
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2016-07-25 20:12:07 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2016-07-25 20:12:07 +0000
commita17e28e18db4858a49d5582d6d986a1e651fdb5a (patch)
treeae41eb6ed9a693771575c769be3f4e819d4b0ddb /lib/mesa/src/mapi
parentdbd3c6ee060c5d5f084786d966088e75ebdf089b (diff)
Disable the code that allocates W|X memory. There is fallback code that
gets used if allocating W|X memory fails, which is probably a bit slower. However, that is much better than commit a W^X violation which currently gets you killed. ok jca@
Diffstat (limited to 'lib/mesa/src/mapi')
-rw-r--r--lib/mesa/src/mapi/u_execmem.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/mesa/src/mapi/u_execmem.c b/lib/mesa/src/mapi/u_execmem.c
index 89d5c1d08..3af9d0ac9 100644
--- a/lib/mesa/src/mapi/u_execmem.c
+++ b/lib/mesa/src/mapi/u_execmem.c
@@ -45,8 +45,15 @@ static unsigned int head = 0;
static unsigned char *exec_mem = (unsigned char *)0;
+#if defined(__OpenBSD__)
-#if defined(__linux__) || defined(__OpenBSD__) || defined(_NetBSD__) || defined(__sun) || defined(__HAIKU__)
+static int
+init_map(void)
+{
+ return 0;
+}
+
+#elif defined(__linux__) || defined(_NetBSD__) || defined(__sun) || defined(__HAIKU__)
#include <unistd.h>
#include <sys/mman.h>