X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fmain%2Fexecmem.c;h=57c1e117c89063d95cd6222847b86276e9c46892;hb=54f425b5cefd1e40f315a4f8747b9a3db29ab9d4;hp=b40a2de8fa42bc5dbfc7480bbe50e3d77a0681a1;hpb=66611f2298539fa28a3667c02ca4013602634d3d;p=mesa.git diff --git a/src/mesa/main/execmem.c b/src/mesa/main/execmem.c index b40a2de8fa4..57c1e117c89 100644 --- a/src/mesa/main/execmem.c +++ b/src/mesa/main/execmem.c @@ -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 @@ -51,6 +51,12 @@ #include #endif + +#ifndef MAP_ANONYMOUS +#define MAP_ANONYMOUS MAP_ANON +#endif + + #define EXEC_HEAP_SIZE (10*1024*1024) _glthread_DECLARE_STATIC_MUTEX(exec_mutex);