From: Chen Gang Date: Mon, 11 Jan 2016 05:58:50 +0000 (+0800) Subject: linux-user/syscall.c: Use SOL_SOCKET instead of level for setsockopt() X-Git-Tag: qemu-xen-4.8.0-rc1~591^2~3 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=fad6c58a3d2b7d4c20754b2b906927905db13392;p=qemu-xen.git linux-user/syscall.c: Use SOL_SOCKET instead of level for setsockopt() In this case, level is TARGET_SOL_SOCKET, but we need SOL_SOCKET for setsockopt(). Signed-off-by: Chen Gang Reviewed-by: Laurent Vivier Signed-off-by: Riku Voipio --- diff --git a/linux-user/syscall.c b/linux-user/syscall.c index d1eb3eb6a5..11b72e1680 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -1659,7 +1659,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; }