/**
- * \file exemem.c
+ * \file execmem.c
* Functions for allocating executable memory.
*
* \author Keith Whitwell
-#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);