summaryrefslogtreecommitdiffstats
path: root/libc/include/sys/socket.h
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2014-10-07 11:10:36 -0700
committerDan Albert <danalbert@google.com>2014-10-07 16:46:47 -0700
commit658727e111ed6dee7be5239494f0764f7b1b02f8 (patch)
tree253051956500d39d0a9e8d282aacebe78dc21def /libc/include/sys/socket.h
parenteeb9aa02b7f307a1d9b80731dd69ef9dd2f47e47 (diff)
downloadbionic-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/include/sys/socket.h')
-rw-r--r--libc/include/sys/socket.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/libc/include/sys/socket.h b/libc/include/sys/socket.h
index a8840ff..43d1586 100644
--- a/libc/include/sys/socket.h
+++ b/libc/include/sys/socket.h
@@ -291,11 +291,12 @@ extern ssize_t recv(int, void*, size_t, int);
__socketcall ssize_t sendto(int, const void*, size_t, int, const struct sockaddr*, socklen_t);
__socketcall ssize_t recvfrom(int, void*, size_t, int, const struct sockaddr*, socklen_t*);
-#if defined(__BIONIC_FORTIFY)
__errordecl(__recvfrom_error, "recvfrom called with size bigger than buffer");
extern ssize_t __recvfrom_chk(int, void*, size_t, size_t, int, const struct sockaddr*, socklen_t*);
extern ssize_t __recvfrom_real(int, void*, size_t, int, const struct sockaddr*, socklen_t*) __RENAME(recvfrom);
+#if defined(__BIONIC_FORTIFY)
+
__BIONIC_FORTIFY_INLINE
ssize_t recvfrom(int fd, void* buf, size_t len, int flags, const struct sockaddr* src_addr, socklen_t* addr_len) {
size_t bos = __bos0(buf);