Use getpagesize() on non-Darwin platforms.

- Presumably we will eventually need configure magic for this stuff.

llvm-svn: 74586
This commit is contained in:
Daniel Dunbar 2009-07-01 06:02:53 +00:00
parent 3dd1b4b6f2
commit f118402877
1 changed files with 2 additions and 1 deletions

View File

@ -24,7 +24,8 @@ void __enable_execute_stack(void* addr)
// On Darwin, pagesize is always 4096 bytes
const uintptr_t pageSize = 4096;
#else
abort();
// FIXME: We should have a configure check for this.
const uintptr_t pagesize = getpagesize();
#endif
const uintptr_t pageAlignMask = ~(pageSize-1);
uintptr_t p = (uintptr_t)addr;