aboutsummaryrefslogtreecommitdiff
path: root/include/platform.h
diff options
context:
space:
mode:
authorChris Renshaw <osm0sis@outlook.com>2015-12-17 16:42:01 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2015-12-17 16:42:41 +0100
commit6df961257d584714c5690b1f4197c677e4f832ec (patch)
treeff33f9a5fb3f68338dd4e737cbd4b8bd4546aae9 /include/platform.h
parente0942acb9e186cbfc16afe704e10a8af9cd1cc58 (diff)
downloadbusybox-6df961257d584714c5690b1f4197c677e4f832ec.tar.gz
Resolve linker issues with Android API 21 (dprintf, tcdrain)
Signed-off-by: Chris Renshaw <osm0sis@outlook.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include/platform.h')
-rw-r--r--include/platform.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/platform.h b/include/platform.h
index 1706b1847..026ebbe17 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -481,9 +481,14 @@ typedef unsigned smalluint;
#if defined(ANDROID) || defined(__ANDROID__)
# if __ANDROID_API__ < 8
+ /* ANDROID < 8 has no [f]dprintf at all */
# undef HAVE_DPRINTF
-# else
+# elif __ANDROID_API__ < 21
+ /* ANDROID < 21 has fdprintf */
# define dprintf fdprintf
+# else
+ /* ANDROID >= 21 has standard dprintf */
+# endif
# endif
# if __ANDROID_API__ < 21
# undef HAVE_TTYNAME_R