Signed-off-by: Chris Renshaw <osm0sis@outlook.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
#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
return syscall(__NR_pivot_root, new_root, put_old);
}
+# if __ANDROID_API__ < 21
int tcdrain(int fd)
{
return ioctl(fd, TCSBRK, 1);
}
+# endif
#endif