From: Andreas Schwab <sch...@suse.de>

Set msg_flags in the returned struct msghdr.

Signed-off-by: Andreas Schwab <sch...@suse.de>
Reviewed-by: Laurent Vivier <laur...@vivier.eu>
Reviewed-by: Philippe Mathieu-Daudé <phi...@redhat.com>
Message-Id: <mvmimxprmn8....@suse.de>
Signed-off-by: Laurent Vivier <laur...@vivier.eu>
---
 linux-user/syscall.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 5bbb72f3d5fc..f380048cbd8b 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);
-- 
2.20.1


Reply via email to