From 778efe37eed03de6e194a746925f1160181ff587 Mon Sep 17 00:00:00 2001 From: Matt Whitlock Date: Sun, 3 May 2015 18:59:50 +0200 Subject: [PATCH] Conditionalize Bionic workarounds on __ANDROID_API__ Signed-off-by: Matt Whitlock Signed-off-by: Denys Vlasenko --- include/platform.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/include/platform.h b/include/platform.h index 8896a6b99..1706b1847 100644 --- a/include/platform.h +++ b/include/platform.h @@ -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 -- 2.25.1