aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-05-31 17:25:35 +0100
committerPeter Maydell <peter.maydell@linaro.org>2016-06-06 17:21:27 +0100
commit1fe354b9888f1a5b257ebe861375292a98bbd314 (patch)
tree74b8accd842930573be7827f6f6b5a9202ea22d7
parent30b9ca52df8c597b4309518d525cef97240cbcb3 (diff)
downloadqemu-arm-1fe354b9888f1a5b257ebe861375292a98bbd314.tar.gz
linux-user: Use safe_syscall wrapper for connect syscall
Use the safe_syscall wrapper for the connect syscall. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--linux-user/syscall.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 28f7244c55..b649a8c7fe 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -701,6 +701,8 @@ safe_syscall2(int, tkill, int, tid, int, sig)
safe_syscall3(int, tgkill, int, tgid, int, pid, int, sig)
safe_syscall3(ssize_t, readv, int, fd, const struct iovec *, iov, int, iovcnt)
safe_syscall3(ssize_t, writev, int, fd, const struct iovec *, iov, int, iovcnt)
+safe_syscall3(int, connect, int, fd, const struct sockaddr *, addr,
+ socklen_t, addrlen)
static inline int host_to_target_sock_type(int host_type)
{
@@ -2236,7 +2238,7 @@ static abi_long do_connect(int sockfd, abi_ulong target_addr,
if (ret)
return ret;
- return get_errno(connect(sockfd, addr, addrlen));
+ return get_errno(safe_connect(sockfd, addr, addrlen));
}
/* do_sendrecvmsg_locked() Must return target values and target errnos. */