aboutsummaryrefslogtreecommitdiff
path: root/lib/portability.h
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2014-11-21 06:42:37 -0600
committerRob Landley <rob@landley.net>2014-11-21 06:42:37 -0600
commit69a9f257234a32b3aab2b0cdced8e898c940d3e9 (patch)
treeb9d7f1a617b3fe7c4371aab168dd5af6891c4e6c /lib/portability.h
parent29e5e24c6d7ea08fc84895eb48de3a5f2250a547 (diff)
downloadtoybox-69a9f257234a32b3aab2b0cdced8e898c940d3e9.tar.gz
Patch from Elliott Hughes for Android/bionic build.
Diffstat (limited to 'lib/portability.h')
-rw-r--r--lib/portability.h5
1 files changed, 4 insertions, 1 deletions
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);