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
This commit is contained in:
@@ -51,10 +51,11 @@ typedef struct {
|
||||
|
||||
#define FD_ZERO(set) (memset(set, 0, sizeof(*(fd_set*)(set))))
|
||||
|
||||
#if defined(__BIONIC_FORTIFY)
|
||||
extern void __FD_CLR_chk(int, fd_set*, size_t);
|
||||
extern void __FD_SET_chk(int, fd_set*, size_t);
|
||||
extern int __FD_ISSET_chk(int, fd_set*, size_t);
|
||||
|
||||
#if defined(__BIONIC_FORTIFY)
|
||||
#define FD_CLR(fd, set) __FD_CLR_chk(fd, set, __bos(set))
|
||||
#define FD_SET(fd, set) __FD_SET_chk(fd, set, __bos(set))
|
||||
#define FD_ISSET(fd, set) __FD_ISSET_chk(fd, set, __bos(set))
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -160,12 +160,12 @@ extern int stat64(const char*, struct stat64*);
|
||||
extern int mknod(const char*, mode_t, dev_t);
|
||||
extern mode_t umask(mode_t);
|
||||
|
||||
#if defined(__BIONIC_FORTIFY)
|
||||
|
||||
extern mode_t __umask_chk(mode_t);
|
||||
extern mode_t __umask_real(mode_t) __RENAME(umask);
|
||||
__errordecl(__umask_invalid_mode, "umask called with invalid mode");
|
||||
|
||||
#if defined(__BIONIC_FORTIFY)
|
||||
|
||||
__BIONIC_FORTIFY_INLINE
|
||||
mode_t umask(mode_t mode) {
|
||||
#if !defined(__clang__)
|
||||
|
||||
Reference in New Issue
Block a user