summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/enable_execute_stack.c
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
commitf118402877c8b92cc9969327b5c78d5132b2050c (patch)
tree0f5604390b9ac640c3f22fb0a9c8f78845f1394c /compiler-rt/lib/enable_execute_stack.c
parent3dd1b4b6f21babbf28d8178c67b87859766093ed (diff)
downloadbcm5719-llvm-f118402877c8b92cc9969327b5c78d5132b2050c.tar.gz
bcm5719-llvm-f118402877c8b92cc9969327b5c78d5132b2050c.zip
Use getpagesize() on non-Darwin platforms.
- Presumably we will eventually need configure magic for this stuff. llvm-svn: 74586
Diffstat (limited to 'compiler-rt/lib/enable_execute_stack.c')
-rw-r--r--compiler-rt/lib/enable_execute_stack.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler-rt/lib/enable_execute_stack.c b/compiler-rt/lib/enable_execute_stack.c
index 2c1878238a9..534ce2f075a 100644
--- a/compiler-rt/lib/enable_execute_stack.c
+++ b/compiler-rt/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;
OpenPOWER on IntegriCloud