[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] linux-user/syscall.c: Use SOL_SOCKET instead of
From: |
Laurent Vivier |
Subject: |
Re: [Qemu-devel] [PATCH] linux-user/syscall.c: Use SOL_SOCKET instead of level for setsockopt() |
Date: |
Mon, 11 Jan 2016 08:52:29 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 |
Le 11/01/2016 06:58, address@hidden a écrit :
> From: Chen Gang <address@hidden>
>
> In this case, level is TARGET_SOL_SOCKET, but we need SOL_SOCKET for
> setsockopt().
>
> Signed-off-by: Chen Gang <address@hidden>
> ---
> linux-user/syscall.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 95b1762..44485f2 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -1596,7 +1596,8 @@ set_timeout:
> addr_ifname = alloca(IFNAMSIZ);
> memcpy(addr_ifname, dev_ifname, optlen);
> addr_ifname[optlen] = 0;
> - ret = get_errno(setsockopt(sockfd, level, optname, addr_ifname,
> optlen));
> + ret = get_errno(setsockopt(sockfd, SOL_SOCKET, optname,
> + addr_ifname, optlen));
> unlock_user (dev_ifname, optval_addr, 0);
> return ret;
> }
>
Reviewed-by: Laurent Vivier <address@hidden>