diff options
-rw-r--r-- | rts/sm/Storage.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/rts/sm/Storage.c b/rts/sm/Storage.c index 9609ba8aec..6bcd11df5a 100644 --- a/rts/sm/Storage.c +++ b/rts/sm/Storage.c @@ -1595,11 +1595,12 @@ void flushExec (W_ len, AdjustorExecutable exec_addr) #endif } -#if defined(linux_HOST_OS) +#if defined(linux_HOST_OS) || defined(netbsd_HOST_OS) // On Linux we need to use libffi for allocating executable memory, // because it knows how to work around the restrictions put in place -// by SELinux. +// by SELinux. The same goes for NetBSD where it is prohibited to +// mark a page mapping both writable and executable at the same time. AdjustorWritable allocateExec (W_ bytes, AdjustorExecutable *exec_ret) { |