linux-user: fix recvmsg emulation
PATCH 1/1 linux-user: fix recvmsg emulation
Set msg_flags in the returned struct msghdr.
Signed-off-by Andreas Schwab <[email protected]>
--- linux-user/syscall.c | 1 + 1 file changed, 1 insertion(+)
linux-user/syscall.c +1 -0
@@ -2797,6 +2797,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);
Signature · 7 lines
2.20.1 -- Andreas Schwab, SUSE Labs, [email protected] GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."
Quoted 13 lines · Andreas Schwab
Set
msg_flagsin the returned struct msghdr.Signed-off-by Andreas Schwab <[email protected]>--- linux-user/syscall.c | 1 + 1 file changed, 1 insertion(+)linux-user/syscall.c +0
-0
linux-user/syscall.c static abi_long do_sendrecvmsg_locked(int fd, struct target_msghdr *msgp, · line 2803
Quoted 7 lines
linux-user/syscall.c +1
-0@@ -2797,6 +2797,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);
Reviewed-by Laurent Vivier <[email protected]>
Quoted 3 lines · Andreas Schwab
Set
msg_flagsin the returned struct msghdr.Signed-off-by Andreas Schwab <[email protected]>
Reviewed-by Philippe Mathieu-Daudé <[email protected]>
Quoted 17 lines
--- linux-user/syscall.c | 1 + 1 file changed, 1 insertion(+)linux-user/syscall.c +1
-0@@ -2797,6 +2797,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);
Laurent Vivier
AppliedQuoted 13 lines · Andreas Schwab
Set
msg_flagsin the returned struct msghdr.Signed-off-by Andreas Schwab <[email protected]>--- linux-user/syscall.c | 1 + 1 file changed, 1 insertion(+)linux-user/syscall.c +0
-0
linux-user/syscall.c static abi_long do_sendrecvmsg_locked(int fd, struct target_msghdr *msgp, · line 2803
Quoted 7 lines
linux-user/syscall.c +1
-0@@ -2797,6 +2797,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);
Applied to my linux-user branch.
Thanks,
Laurent