diff --git a/ndk/platforms/android-3/include/sys/cdefs.h b/ndk/platforms/android-3/include/sys/cdefs.h index 238943718..27c575c87 100644 --- a/ndk/platforms/android-3/include/sys/cdefs.h +++ b/ndk/platforms/android-3/include/sys/cdefs.h @@ -85,7 +85,7 @@ #define ___STRING(x) __STRING(x) #define ___CONCAT(x,y) __CONCAT(x,y) -#if __STDC__ || defined(__cplusplus) +#if defined(__STDC__) || defined(__cplusplus) #define __P(protos) protos /* full-blown ANSI C */ #define __CONCAT(x,y) x ## y #define __STRING(x) #x @@ -219,7 +219,7 @@ * C99 defines the restrict type qualifier keyword, which was made available * in GCC 2.92. */ -#if __STDC_VERSION__ >= 199901L +#if defined(__STDC__VERSION__) && __STDC_VERSION__ >= 199901L #define __restrict restrict #else #if !__GNUC_PREREQ__(2, 92) @@ -231,7 +231,7 @@ * C99 defines __func__ predefined identifier, which was made available * in GCC 2.95. */ -#if !(__STDC_VERSION__ >= 199901L) +#if !defined(__STDC_VERSION__) || !(__STDC_VERSION__ >= 199901L) #if __GNUC_PREREQ__(2, 6) #define __func__ __PRETTY_FUNCTION__ #elif __GNUC_PREREQ__(2, 4) @@ -503,5 +503,6 @@ #endif #define __BIONIC__ 1 +#include #endif /* !_SYS_CDEFS_H_ */ diff --git a/ndk/platforms/android-3/include/sys/cdefs_elf.h b/ndk/platforms/android-3/include/sys/cdefs_elf.h index e051b1d0e..1e5747010 100644 --- a/ndk/platforms/android-3/include/sys/cdefs_elf.h +++ b/ndk/platforms/android-3/include/sys/cdefs_elf.h @@ -95,6 +95,10 @@ __asm__(".section _sec\n\t.asciz _str\n\t.previous") #endif +/* GCC visibility helper macro */ +#define __LIBC_HIDDEN__ \ + __attribute__ ((visibility ("hidden"))) + #define __IDSTRING(_n,_s) __SECTIONSTRING(.ident,_s) #define __RCSID(_s) __IDSTRING(rcsid,_s)