From 1586376f2eb84f07797930d779119dda7b618c73 Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Sun, 9 Aug 2009 18:59:21 +0000 Subject: [PATCH] fix build on linux llvm-svn: 78538 --- compiler-rt/lib/enable_execute_stack.c | 2 +- compiler-rt/lib/endianness.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler-rt/lib/enable_execute_stack.c b/compiler-rt/lib/enable_execute_stack.c index aed1b88c5142..6f17c9b95284 100644 --- a/compiler-rt/lib/enable_execute_stack.c +++ b/compiler-rt/lib/enable_execute_stack.c @@ -30,7 +30,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 = sysconf(_SC_PAGESIZE); #endif const uintptr_t pageAlignMask = ~(pageSize-1); uintptr_t p = (uintptr_t)addr; diff --git a/compiler-rt/lib/endianness.h b/compiler-rt/lib/endianness.h index 8069bacb992f..5c212c4453f9 100644 --- a/compiler-rt/lib/endianness.h +++ b/compiler-rt/lib/endianness.h @@ -72,7 +72,7 @@ /* .. */ -#if defined(__Linux__) +#if defined(__linux__) #include #if __BYTE_ORDER == __BIG_ENDIAN