summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-07-01 06:02:53 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-07-01 06:02:53 +0000
commit72b5907f318972685252659ca191d63fbe2f352b (patch)
treecccc5a085bbc0a63f254c994525b76f8dcdc2e3c
parentff5380f65f639f043680868c74927c15f7428499 (diff)
Use getpagesize() on non-Darwin platforms.
- Presumably we will eventually need configure magic for this stuff. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@74586 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/enable_execute_stack.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/enable_execute_stack.c b/lib/enable_execute_stack.c
index 2c1878238..534ce2f07 100644
--- a/lib/enable_execute_stack.c
+++ b/lib/enable_execute_stack.c
@@ -24,7 +24,8 @@ void __enable_execute_stack(void* addr)
// On Darwin, pagesize is always 4096 bytes
const uintptr_t pageSize = 4096;
#else
- abort();
+ // FIXME: We should have a configure check for this.
+ const uintptr_t pagesize = getpagesize();
#endif
const uintptr_t pageAlignMask = ~(pageSize-1);
uintptr_t p = (uintptr_t)addr;