X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fmain%2Fexecmem.c;h=f95c31862a5e2510659098f67e3b083409af08d8;hb=80a718a63bf2fa817e346f0f5731ee9ef2e0e68b;hp=b40a2de8fa42bc5dbfc7480bbe50e3d77a0681a1;hpb=66611f2298539fa28a3667c02ca4013602634d3d;p=mesa.git diff --git a/src/mesa/main/execmem.c b/src/mesa/main/execmem.c index b40a2de8fa4..f95c31862a5 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__) || defined(_NetBSD__) /* * 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);