From 6df961257d584714c5690b1f4197c677e4f832ec Mon Sep 17 00:00:00 2001 From: Chris Renshaw Date: Thu, 17 Dec 2015 16:42:01 +0100 Subject: Resolve linker issues with Android API 21 (dprintf, tcdrain) Signed-off-by: Chris Renshaw Signed-off-by: Denys Vlasenko --- include/platform.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include/platform.h') 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 -- cgit v1.2.3