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/bionic/__recvfrom_chk.cpp | |
parent | eeb9aa02b7f307a1d9b80731dd69ef9dd2f47e47 (diff) | |
download | bionic-658727e111ed6dee7be5239494f0764f7b1b02f8.zip bionic-658727e111ed6dee7be5239494f0764f7b1b02f8.tar.gz bionic-658727e111ed6dee7be5239494f0764f7b1b02f8.tar.bz2 |
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/bionic/__recvfrom_chk.cpp')
-rw-r--r-- | libc/bionic/__recvfrom_chk.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libc/bionic/__recvfrom_chk.cpp b/libc/bionic/__recvfrom_chk.cpp index 48baa8e..9c894b0 100644 --- a/libc/bionic/__recvfrom_chk.cpp +++ b/libc/bionic/__recvfrom_chk.cpp @@ -32,9 +32,9 @@ #include <sys/socket.h> #include "private/libc_logging.h" -extern "C" -ssize_t __recvfrom_chk(int socket, void* buf, size_t len, size_t buflen, unsigned int flags, - const struct sockaddr* src_addr, socklen_t* addrlen) { +ssize_t __recvfrom_chk(int socket, void* buf, size_t len, size_t buflen, + int flags, const struct sockaddr* src_addr, + socklen_t* addrlen) { if (__predict_false(len > buflen)) { __fortify_chk_fail("recvfrom: prevented write past end of buffer", 0); } |