aboutsummaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-06-06 19:58:03 +0100
committerRiku Voipio <riku.voipio@linaro.org>2016-06-08 10:13:45 +0300
commit2a3c7619288af9cfcc09a233dce911bf80849dfb (patch)
tree8f2473c6c8d6750f6fac60f28905fe551268b58c /linux-user
parent918c03ed9ac583eb9d5c33345a814291e1dd2e87 (diff)
downloadqemu-2a3c7619288af9cfcc09a233dce911bf80849dfb.zip
qemu-2a3c7619288af9cfcc09a233dce911bf80849dfb.tar.gz
qemu-2a3c7619288af9cfcc09a233dce911bf80849dfb.tar.bz2
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> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'linux-user')
-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 e0c49cc..b363944 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -714,6 +714,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)
{
@@ -2859,7 +2861,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. */