Use mmap to allocate execute memory
authorTobias Nygren <tnn@netbsd.org>
Sun, 7 Aug 2011 09:57:05 +0000 (09:57 +0000)
committerBlue Swirl <blauwirbel@gmail.com>
Sun, 7 Aug 2011 09:57:05 +0000 (09:57 +0000)
Use mmap to allocate executable memory on NetBSD as well.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
exec.c

diff --git a/exec.c b/exec.c
index 5bc9203..719fff9 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -526,7 +526,8 @@ static void code_gen_alloc(unsigned long tb_size)
         }
     }
 #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) \
-    || defined(__DragonFly__) || defined(__OpenBSD__)
+    || defined(__DragonFly__) || defined(__OpenBSD__) \
+    || defined(__NetBSD__)
     {
         int flags;
         void *addr = NULL;