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/fcntl.h b/libc/include/fcntl.h
index 88bcc78..2d01be7 100644
--- a/libc/include/fcntl.h
+++ b/libc/include/fcntl.h
@@ -108,6 +108,7 @@
 #define __open_too_few_args_error "called with O_CREAT, but missing mode"
 #if defined(__clang__)
 
+#if __ANDROID_API__ >= __ANDROID_API_J_MR1__
 __BIONIC_ERROR_FUNCTION_VISIBILITY
 int open(const char* pathname, int flags, mode_t modes, ...) __overloadable
         __errorattr(__open_too_many_args_error);
@@ -156,11 +157,13 @@
            mode_t modes) __overloadable {
     return __openat_real(dirfd, pathname, flags, modes);
 }
+#endif /* __ANDROID_API__ >= __ANDROID_API_J_MR1__ */
 
 #else /* defined(__clang__) */
 __errordecl(__creat_missing_mode, __open_too_few_args_error);
 __errordecl(__creat_too_many_args, __open_too_many_args_error);
 
+#if __ANDROID_API__ >= __ANDROID_API_J_MR1__
 __BIONIC_FORTIFY_INLINE
 int open(const char* pathname, int flags, ...) {
     if (__builtin_constant_p(flags)) {
@@ -198,6 +201,7 @@
 
     return __openat_real(dirfd, pathname, flags, __builtin_va_arg_pack());
 }
+#endif /* __ANDROID_API__ >= __ANDROID_API_J_MR1__ */
 
 #endif /* defined(__clang__) */