diff options
author | Dan Albert <danalbert@google.com> | 2017-02-14 19:28:18 -0800 |
---|---|---|
committer | Dan Albert <danalbert@google.com> | 2017-02-14 22:22:13 -0800 |
commit | 9c2094f3c527301068f2049eefd9e684a7995352 (patch) | |
tree | e5c03a364d9abadd8c2d0cc63e865e81d4cfc4c2 /libc/include/unistd.h | |
parent | 8b154b1e8233e1d34a6a66b72369f05f8655b653 (diff) | |
download | bionic-9c2094f3c527301068f2049eefd9e684a7995352.tar.gz |
Fixup API level guards for new fortify functions.
Test: tools/update_headers.sh && make checkbuild
Bug: None
Change-Id: I9d06ea8a5ee9dc27d957f59e6e84150651ed1c76
Diffstat (limited to 'libc/include/unistd.h')
-rw-r--r-- | libc/include/unistd.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libc/include/unistd.h b/libc/include/unistd.h index 7c6125a24..017d97a5a 100644 --- a/libc/include/unistd.h +++ b/libc/include/unistd.h @@ -403,6 +403,7 @@ ssize_t pwrite64(int fd, const void* const __pass_object_size0 buf, } #endif /* __ANDROID_API__ >= __ANDROID_API_N__ */ +#if __ANDROID_API__ >= __ANDROID_API_L__ __BIONIC_ERROR_FUNCTION_VISIBILITY ssize_t read(int fd, void* buf, size_t count) __overloadable __error_if_overflows_ssizet(count); @@ -423,7 +424,9 @@ ssize_t read(int fd, void* const __pass_object_size0 buf, size_t count) return __read_chk(fd, buf, count, bos); } +#endif /* __ANDROID_API__ >= __ANDROID_API_L__ */ +#if __ANDROID_API__ >= __ANDROID_API_N__ __BIONIC_ERROR_FUNCTION_VISIBILITY ssize_t write(int fd, const void* buf, size_t count) __overloadable __error_if_overflows_ssizet(count); @@ -444,7 +447,9 @@ ssize_t write(int fd, const void* const __pass_object_size0 buf, size_t count) return __write_chk(fd, buf, count, bos); } +#endif /* __ANDROID_API__ >= __ANDROID_API_N__ */ +#if __ANDROID_API__ >= __ANDROID_API_M__ __BIONIC_ERROR_FUNCTION_VISIBILITY ssize_t readlink(const char* path, char* buf, size_t size) __overloadable __error_if_overflows_ssizet(size); @@ -466,7 +471,6 @@ ssize_t readlink(const char* path, char* const __pass_object_size buf, return __readlink_chk(path, buf, size, bos); } - __BIONIC_ERROR_FUNCTION_VISIBILITY ssize_t readlinkat(int dirfd, const char* path, char* buf, size_t size) __overloadable @@ -490,6 +494,7 @@ ssize_t readlinkat(int dirfd, const char* path, return __readlinkat_chk(dirfd, path, buf, size, bos); } +#endif /* __ANDROID_API__ >= __ANDROID_API_M__ */ #undef __enable_if_no_overflow_ssizet #undef __error_if_overflows_objectsize |