diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-07-01 06:06:42 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-07-01 06:06:42 +0000 |
commit | f6392137118661add2ab7fc98be42a0c8748bb1d (patch) | |
tree | d75a9114bc064f0a166f00a709554f6be1ee6be6 | |
parent | 940515afdb99568d5d9cc9f6b9a80335a8e35646 (diff) | |
download | compiler-rt-f6392137118661add2ab7fc98be42a0c8748bb1d.tar.gz compiler-rt-f6392137118661add2ab7fc98be42a0c8748bb1d.tar.bz2 compiler-rt-f6392137118661add2ab7fc98be42a0c8748bb1d.tar.xz |
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
-rw-r--r-- | lib/enable_execute_stack.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/enable_execute_stack.c b/lib/enable_execute_stack.c index 534ce2f0..15ab03fd 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 @@ void __enable_execute_stack(void* addr) 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; |