[PATCH] D33874: Implement AllocateRWX and ReleaseRWX for NetBSD
Kamil Rytarowski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 18 07:05:04 PDT 2017
krytarowski updated this revision to Diff 102967.
krytarowski edited the summary of this revision.
krytarowski added a comment.
Herald added a subscriber: sdardis.
Upload new revision suggested by Joerg.
Repository:
rL LLVM
https://reviews.llvm.org/D33874
Files:
lib/Support/Unix/Memory.inc
Index: lib/Support/Unix/Memory.inc
===================================================================
--- lib/Support/Unix/Memory.inc
+++ lib/Support/Unix/Memory.inc
@@ -195,6 +195,10 @@
#if defined(__APPLE__) && (defined(__arm__) || defined(__arm64__))
void *pa = ::mmap(start, PageSize*NumPages, PROT_READ|PROT_EXEC,
flags, fd, 0);
+#elif defined(__NetBSD__) && defined(PROT_MPROTECT)
+ void *pa =
+ ::mmap(start, PageSize * NumPages,
+ PROT_READ | PROT_WRITE | PROT_MPROTECT(PROT_EXEC), flags, fd, 0);
#else
void *pa = ::mmap(start, PageSize*NumPages, PROT_READ|PROT_WRITE|PROT_EXEC,
flags, fd, 0);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33874.102967.patch
Type: text/x-patch
Size: 671 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170618/90c2f531/attachment.bin>
More information about the llvm-commits
mailing list