Declare __page_shift and __page_size with C linkage
__page_shift and __page_size are defined in asm/page.h with
C linkage - their implementation needs to use the same linkage.
The different linkage types cause a compiler error with clang.
Fixing them seems to be a good idea regardless of the compiler.
Change-Id: I35ed66a08989ced1db422eb03e4d154a5d6b5bda
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
diff --git a/libc/bionic/libc_init_common.cpp b/libc/bionic/libc_init_common.cpp
index 1fc490e..68a7309 100644
--- a/libc/bionic/libc_init_common.cpp
+++ b/libc/bionic/libc_init_common.cpp
@@ -59,8 +59,8 @@
uintptr_t __stack_chk_guard = 0;
// Declared in <asm/page.h>.
-unsigned int __page_size = PAGE_SIZE;
-unsigned int __page_shift = PAGE_SHIFT;
+extern "C" unsigned int __page_size = PAGE_SIZE;
+extern "C" unsigned int __page_shift = PAGE_SHIFT;
/* Init TLS for the initial thread. Called by the linker _before_ libc is mapped
* in memory. Beware: all writes to libc globals from this function will