diff options
author | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2019-10-21 13:48:52 +0200 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2019-10-21 15:25:59 +0200 |
commit | a47401bca779582139dbb4d2551b1955b0a95d4a (patch) | |
tree | c6a680abea87184ab7a4a3af605a1b5a5f2644dd /linux-user/syscall.c | |
parent | 0d2187c4e0256ce1f3682cda9c6aadfa445a1c48 (diff) |
linux-user/syscall: Introduce target_sockaddr_nl
Tested-By: Guido Günther <agx@sigxcpu.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20191021114857.20538-5-f4bug@amsat.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r-- | linux-user/syscall.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index e2af3c1494..f1ab81b917 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -1496,8 +1496,10 @@ static inline abi_long host_to_target_sockaddr(abi_ulong target_addr, sizeof(target_saddr->sa_family)) { target_saddr->sa_family = tswap16(addr->sa_family); } - if (addr->sa_family == AF_NETLINK && len >= sizeof(struct sockaddr_nl)) { - struct sockaddr_nl *target_nl = (struct sockaddr_nl *)target_saddr; + if (addr->sa_family == AF_NETLINK && + len >= sizeof(struct target_sockaddr_nl)) { + struct target_sockaddr_nl *target_nl = + (struct target_sockaddr_nl *)target_saddr; target_nl->nl_pid = tswap32(target_nl->nl_pid); target_nl->nl_groups = tswap32(target_nl->nl_groups); } else if (addr->sa_family == AF_PACKET) { |