summaryrefslogtreecommitdiffstats
path: root/linux-user/syscall.c
diff options
context:
space:
mode:
authorAndreas Schwab2019-02-12 17:34:35 +0100
committerLaurent Vivier2019-03-07 10:57:28 +0100
commit24894f39c677a3fd28d0868010a0d50639d49095 (patch)
tree8ea06ef4af6edcadc00d230369d6c1d83edf434c /linux-user/syscall.c
parentMerge remote-tracking branch 'remotes/ehabkost/tags/machine-next-pull-request... (diff)
downloadqemu-24894f39c677a3fd28d0868010a0d50639d49095.tar.gz
qemu-24894f39c677a3fd28d0868010a0d50639d49095.tar.xz
qemu-24894f39c677a3fd28d0868010a0d50639d49095.zip
linux-user: fix recvmsg emulation
Set msg_flags in the returned struct msghdr. Signed-off-by: Andreas Schwab <schwab@suse.de> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <mvmimxprmn8.fsf@suse.de> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r--linux-user/syscall.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 5bbb72f3d5..f380048cbd 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -2759,6 +2759,7 @@ static abi_long do_sendrecvmsg_locked(int fd, struct target_msghdr *msgp,
}
if (!is_error(ret)) {
msgp->msg_namelen = tswap32(msg.msg_namelen);
+ msgp->msg_flags = tswap32(msg.msg_flags);
if (msg.msg_name != NULL && msg.msg_name != (void *)-1) {
ret = host_to_target_sockaddr(tswapal(msgp->msg_name),
msg.msg_name, msg.msg_namelen);