X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FRtsUtils.c;fp=ghc%2Frts%2FRtsUtils.c;h=3e7e225dda3314468ed3deccab22b7d6545e2437;hb=be44e76beb4d5c1dcdc57cee65220d479117cb21;hp=ef7cbb72e2d06329161e8e7da4f892aa9b593fc4;hpb=742aea2b2a562d742fe8a265058e23dd063be47e;p=ghc-hetmet.git diff --git a/ghc/rts/RtsUtils.c b/ghc/rts/RtsUtils.c index ef7cbb7..3e7e225 100644 --- a/ghc/rts/RtsUtils.c +++ b/ghc/rts/RtsUtils.c @@ -40,7 +40,7 @@ #include #endif -#if defined(openbsd_HOST_OS) || defined(linux_HOST_OS) +#if defined(openbsd_HOST_OS) || defined(linux_HOST_OS) || defined(darwin_HOST_OS) #include #include #include @@ -352,7 +352,7 @@ stgMallocBytesRWX(int len) barf("mallocBytesRWX: failed to protect 0x%p; error=%lu; old protection: %lu\n", addr, (unsigned long)GetLastError(), (unsigned long)dwOldProtect); } -#elif defined(openbsd_HOST_OS) || defined(linux_HOST_OS) +#elif defined(openbsd_HOST_OS) || defined(linux_HOST_OS) || defined(darwin_HOST_OS) /* malloced memory isn't executable by default on OpenBSD */ my_uintptr_t pageSize = sysconf(_SC_PAGESIZE); my_uintptr_t mask = ~(pageSize - 1);