From f1f1b48dc7d6855406a59e8fc2ffbad81970ee88 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Fri, 12 Oct 2012 14:31:29 +0200 Subject: [PATCH] Fix darwin-ism to make it compile on Macs. Change-Id: I7a018ad552764914085e3c89e9ea7e582ca230a7 Reviewed-by: Simon Hausmann --- masm/stubs/ExecutableAllocator.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/masm/stubs/ExecutableAllocator.h b/masm/stubs/ExecutableAllocator.h index 1adce8e..d0a43e4 100644 --- a/masm/stubs/ExecutableAllocator.h +++ b/masm/stubs/ExecutableAllocator.h @@ -56,6 +56,9 @@ struct ExecutableMemoryHandle : public RefCounted { { static size_t pageSize = sysconf(_SC_PAGESIZE); m_size = (m_size + pageSize - 1) & ~(pageSize - 1); +#if OS(DARWIN) +# define MAP_ANONYMOUS MAP_ANON +#endif m_data = mmap(0, m_size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); } ~ExecutableMemoryHandle() -- 2.7.4