fix build on linux
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@78538 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/enable_execute_stack.c b/lib/enable_execute_stack.c
index aed1b88..6f17c9b 100644
--- a/lib/enable_execute_stack.c
+++ b/lib/enable_execute_stack.c
@@ -30,7 +30,7 @@
const uintptr_t pageSize = 4096;
#else
/* FIXME: We should have a configure check for this. */
- const uintptr_t pageSize = getpagesize();
+ const uintptr_t pageSize = sysconf(_SC_PAGESIZE);
#endif
const uintptr_t pageAlignMask = ~(pageSize-1);
uintptr_t p = (uintptr_t)addr;