Guard fortify inlines with __ANDROID_API__.
Test: make checkbuild with libc ndk_library patches applied
Change-Id: Ic5e248994c4f2702b0f4d6dfeda787187ea86017
diff --git a/libc/include/sys/socket.h b/libc/include/sys/socket.h
index 40b9d37..223c3b2 100644
--- a/libc/include/sys/socket.h
+++ b/libc/include/sys/socket.h
@@ -300,6 +300,7 @@
#if defined(__BIONIC_FORTIFY)
+#if __ANDROID_API__ >= 24
__BIONIC_FORTIFY_INLINE
ssize_t recvfrom(int fd, void* buf, size_t len, int flags, const struct sockaddr* src_addr, socklen_t* addr_len) {
size_t bos = __bos0(buf);
@@ -320,6 +321,7 @@
return __recvfrom_chk(fd, buf, len, bos, flags, src_addr, addr_len);
}
+#endif /* __ANDROID_API__ >= 24 */
__BIONIC_FORTIFY_INLINE
ssize_t recv(int socket, void* buf, size_t len, int flags) {