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 <gang.chen.5i5j@gmail.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
This commit is contained in:
parent
c0d3573632
commit
fad6c58a3d
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user