diff options
author | Dan Albert <danalbert@google.com> | 2014-10-07 11:10:36 -0700 |
---|---|---|
committer | Dan Albert <danalbert@google.com> | 2014-10-07 16:46:47 -0700 |
commit | 658727e111ed6dee7be5239494f0764f7b1b02f8 (patch) | |
tree | 253051956500d39d0a9e8d282aacebe78dc21def /libc/include/fcntl.h | |
parent | eeb9aa02b7f307a1d9b80731dd69ef9dd2f47e47 (diff) | |
download | android_bionic-658727e111ed6dee7be5239494f0764f7b1b02f8.tar.gz android_bionic-658727e111ed6dee7be5239494f0764f7b1b02f8.tar.bz2 android_bionic-658727e111ed6dee7be5239494f0764f7b1b02f8.zip |
Inline helpers need to be exported unmangled.
__open_2() is used by the fortify implementation of open(2) in
fcntl.h, and as such needs an unmangled C name. For some reason
(inlining?), this doesn't cause problems at the default optimization
level, but does for -O0.
The rest of these didn't cause build failures, but they look suspect
and probably will, we just haven't caught them yet.
Bug: 17784968
Change-Id: I7391a7a8999ee204eaf6abd14a3d5373ea419d5b
Diffstat (limited to 'libc/include/fcntl.h')
-rw-r--r-- | libc/include/fcntl.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/include/fcntl.h b/libc/include/fcntl.h index f57c320f7..108978807 100644 --- a/libc/include/fcntl.h +++ b/libc/include/fcntl.h @@ -75,8 +75,6 @@ extern ssize_t tee(int, int, size_t, unsigned int); extern int unlinkat(int, const char*, int); extern ssize_t vmsplice(int, const struct iovec*, size_t, unsigned int); -#if defined(__BIONIC_FORTIFY) - extern int __open_2(const char*, int); extern int __open_real(const char*, int, ...) __RENAME(open); extern int __openat_2(int, const char*, int); @@ -84,6 +82,8 @@ extern int __openat_real(int, const char*, int, ...) __RENAME(openat); __errordecl(__creat_missing_mode, "called with O_CREAT, but missing mode"); __errordecl(__creat_too_many_args, "too many arguments"); +#if defined(__BIONIC_FORTIFY) + #if !defined(__clang__) __BIONIC_FORTIFY_INLINE |