summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/enable_execute_stack.c
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-07-01 06:06:42 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-07-01 06:06:42 +0000
commitc6cd62b351533f6410e5a3dac1c39ac5cb68986a (patch)
treea4d1560f34e3c2c6da6036d4c0b0b9af03ad4e04 /compiler-rt/lib/enable_execute_stack.c
parent86bb32b138bc1a3a080c190a862e400dac3627e4 (diff)
downloadbcm5719-llvm-c6cd62b351533f6410e5a3dac1c39ac5cb68986a.tar.gz
bcm5719-llvm-c6cd62b351533f6410e5a3dac1c39ac5cb68986a.zip
Add missing include for getpagesize, and fix a typo.
llvm-svn: 74588
Diffstat (limited to 'compiler-rt/lib/enable_execute_stack.c')
-rw-r--r--compiler-rt/lib/enable_execute_stack.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler-rt/lib/enable_execute_stack.c b/compiler-rt/lib/enable_execute_stack.c
index 534ce2f075a..15ab03fd73b 100644
--- a/compiler-rt/lib/enable_execute_stack.c
+++ b/compiler-rt/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;
OpenPOWER on IntegriCloud