From f118402877c8b92cc9969327b5c78d5132b2050c Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Wed, 1 Jul 2009 06:02:53 +0000 Subject: Use getpagesize() on non-Darwin platforms. - Presumably we will eventually need configure magic for this stuff. llvm-svn: 74586 --- compiler-rt/lib/enable_execute_stack.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'compiler-rt/lib/enable_execute_stack.c') 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; -- cgit v1.2.3