forked from OSchip/llvm-project
Add missing include for getpagesize, and fix a typo.
llvm-svn: 74588
This commit is contained in:
parent
86bb32b138
commit
c6cd62b351
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue