Add missing include for getpagesize, and fix a typo.

llvm-svn: 74588
This commit is contained in:
Daniel Dunbar 2009-07-01 06:06:42 +00:00
parent 86bb32b138
commit c6cd62b351
1 changed files with 4 additions and 1 deletions

View File

@ -9,6 +9,9 @@
#include <stdint.h> #include <stdint.h>
#include <sys/mman.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; const uintptr_t pageSize = 4096;
#else #else
// FIXME: We should have a configure check for this. // FIXME: We should have a configure check for this.
const uintptr_t pagesize = getpagesize(); const uintptr_t pageSize = getpagesize();
#endif #endif
const uintptr_t pageAlignMask = ~(pageSize-1); const uintptr_t pageAlignMask = ~(pageSize-1);
uintptr_t p = (uintptr_t)addr; uintptr_t p = (uintptr_t)addr;