diff options
author | wolfgang.thaller@gmx.net <unknown> | 2006-03-23 06:17:45 +0000 |
---|---|---|
committer | wolfgang.thaller@gmx.net <unknown> | 2006-03-23 06:17:45 +0000 |
commit | be44e76beb4d5c1dcdc57cee65220d479117cb21 (patch) | |
tree | 88aa33d626d6de2e2e495f5172a54dc73b2176b6 /ghc | |
parent | 742aea2b2a562d742fe8a265058e23dd063be47e (diff) | |
download | haskell-be44e76beb4d5c1dcdc57cee65220d479117cb21.tar.gz |
Deal with non-executable memory on Darwin (only an issue on Darwin/x86 so far)
Diffstat (limited to 'ghc')
-rw-r--r-- | ghc/rts/RtsUtils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ghc/rts/RtsUtils.c b/ghc/rts/RtsUtils.c index ef7cbb72e2..3e7e225dda 100644 --- a/ghc/rts/RtsUtils.c +++ b/ghc/rts/RtsUtils.c @@ -40,7 +40,7 @@ #include <pthread.h> #endif -#if defined(openbsd_HOST_OS) || defined(linux_HOST_OS) +#if defined(openbsd_HOST_OS) || defined(linux_HOST_OS) || defined(darwin_HOST_OS) #include <unistd.h> #include <sys/types.h> #include <sys/mman.h> @@ -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); |