fix build on linux

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@78538 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/enable_execute_stack.c b/lib/enable_execute_stack.c
index aed1b88..6f17c9b 100644
--- a/lib/enable_execute_stack.c
+++ b/lib/enable_execute_stack.c
@@ -30,7 +30,7 @@
 	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/lib/endianness.h b/lib/endianness.h
index 8069bac..5c212c4 100644
--- a/lib/endianness.h
+++ b/lib/endianness.h
@@ -72,7 +72,7 @@
 
 /* .. */
 
-#if defined(__Linux__)
+#if defined(__linux__)
 #include <endian.h>
 
 #if __BYTE_ORDER == __BIG_ENDIAN