From 69a9f257234a32b3aab2b0cdced8e898c940d3e9 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Fri, 21 Nov 2014 06:42:37 -0600 Subject: Patch from Elliott Hughes for Android/bionic build. --- lib/portability.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/portability.h b/lib/portability.h index 0dace962..548c128f 100644 --- a/lib/portability.h +++ b/lib/portability.h @@ -11,7 +11,10 @@ // This makes it stop. +// Except on Android, where fortify is mandatory. +#if !defined(__ANDROID__) #undef _FORTIFY_SOURCE +#endif // For musl #define _ALL_SOURCE @@ -173,7 +176,7 @@ int clearenv(void); #define SWAP_LE64(x) (x) #endif -#if defined(__APPLE__) || defined(__ANDROID__) \ +#if defined(__APPLE__) \ || (defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ < 10) ssize_t getdelim(char **lineptr, size_t *n, int delim, FILE *stream); ssize_t getline(char **lineptr, size_t *n, FILE *stream); -- cgit v1.2.3