libc/include: remove easy __ANDROID_API__ tautologies.
The next NDK to take these headers only supports API 21 and later, so
clean up some of the trivial cruft.
This doesn't include the remaining "legacy inlines", since they're a bit
more complicated. I'll remove those in later changes.
Test: treehugger
Change-Id: I94c32f6393dd3ae831165917303ea591222baa0d
diff --git a/libc/include/bits/fortify/unistd.h b/libc/include/bits/fortify/unistd.h
index 49a3946..335d0b5 100644
--- a/libc/include/bits/fortify/unistd.h
+++ b/libc/include/bits/fortify/unistd.h
@@ -152,7 +152,7 @@
__overloadable
__error_if_overflows_ssizet(count, read)
__error_if_overflows_objectsize(count, __bos0(buf), read) {
-#if __ANDROID_API__ >= 21 && __BIONIC_FORTIFY_RUNTIME_CHECKS_ENABLED
+#if __BIONIC_FORTIFY_RUNTIME_CHECKS_ENABLED
size_t bos = __bos0(buf);
if (!__bos_trivially_ge_no_overflow(bos, count)) {
@@ -192,7 +192,6 @@
return __call_bypassing_fortify(readlink)(path, buf, size);
}
-#if __ANDROID_API__ >= 21
__BIONIC_FORTIFY_INLINE
ssize_t readlinkat(int dirfd, const char* path, char* const __pass_object_size buf, size_t size)
__overloadable
@@ -207,7 +206,6 @@
#endif
return __call_bypassing_fortify(readlinkat)(dirfd, path, buf, size);
}
-#endif /* __ANDROID_API__ >= 21 */
#undef __bos_trivially_ge_no_overflow
#undef __enable_if_no_overflow_ssizet