Fixup API level guards for new fortify functions.
Test: tools/update_headers.sh && make checkbuild
Bug: None
Change-Id: I9d06ea8a5ee9dc27d957f59e6e84150651ed1c76
diff --git a/libc/include/stdio.h b/libc/include/stdio.h
index f1f86a3..7d63fa4 100644
--- a/libc/include/stdio.h
+++ b/libc/include/stdio.h
@@ -379,6 +379,7 @@
}
#endif /* __ANDROID_API__ >= __ANDROID_API_N__ */
+#if __ANDROID_API__ >= __ANDROID_API_J_MR1__
__BIONIC_ERROR_FUNCTION_VISIBILITY
char *fgets(char* __restrict dest, int size, FILE* stream) __overloadable
__enable_if(size < 0, "size is negative")
@@ -401,6 +402,7 @@
return __fgets_chk(dest, size, stream, bos);
}
+#endif /* __ANDROID_API__ >= __ANDROID_API_J_MR1__ */
#else /* defined(__clang__) */
@@ -482,6 +484,7 @@
}
#endif /* __ANDROID_API__ >= __ANDROID_API_N__ */
+#if __ANDROID_API__ >= __ANDROID_API_J_MR1__
__BIONIC_FORTIFY_INLINE
char *fgets(char* dest, int size, FILE* stream) {
size_t bos = __bos(dest);
@@ -511,6 +514,7 @@
return __fgets_chk(dest, size, stream, bos);
}
+#endif /* __ANDROID_API__ >= __ANDROID_API_J_MR1__ */
#endif /* defined(__clang__) */
#endif /* defined(__BIONIC_FORTIFY) */