Conditionalize Bionic workarounds on __ANDROID_API__
authorMatt Whitlock <busybox@mattwhitlock.name>
Sun, 3 May 2015 16:59:50 +0000 (18:59 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sun, 3 May 2015 17:33:32 +0000 (19:33 +0200)
Signed-off-by: Matt Whitlock <busybox@mattwhitlock.name>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
include/platform.h

index 8896a6b9963e448f5bd3491e436fe7a7aeab026e..1706b1847fc518d24906bc3e583f171e9d4c69d8 100644 (file)
@@ -480,10 +480,16 @@ typedef unsigned smalluint;
 #endif
 
 #if defined(ANDROID) || defined(__ANDROID__)
-# undef HAVE_DPRINTF
-# undef HAVE_TTYNAME_R
-# undef HAVE_GETLINE
-# undef HAVE_STPCPY
+# if __ANDROID_API__ < 8
+#  undef HAVE_DPRINTF
+# else
+#  define dprintf fdprintf
+# endif
+# if __ANDROID_API__ < 21
+#  undef HAVE_TTYNAME_R
+#  undef HAVE_GETLINE
+#  undef HAVE_STPCPY
+# endif
 # undef HAVE_MEMPCPY
 # undef HAVE_STRCHRNUL
 # undef HAVE_STRVERSCMP