summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/platform.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/platform.h b/include/platform.h
index 1706b18..026ebbe 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