Add missing include for getpagesize, and fix a typo.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@74588 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/enable_execute_stack.c b/lib/enable_execute_stack.c
index 534ce2f..15ab03f 100644
--- a/lib/enable_execute_stack.c
+++ b/lib/enable_execute_stack.c
@@ -9,6 +9,9 @@
#include <stdint.h>
#include <sys/mman.h>
+#ifndef __APPLE__
+#include <unistd.h>
+#endif
//
@@ -25,7 +28,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 = getpagesize();
#endif
const uintptr_t pageAlignMask = ~(pageSize-1);
uintptr_t p = (uintptr_t)addr;