diff options
author | Chen Gang <chengang@emindsoft.com.cn> | 2016-01-11 13:58:50 +0800 |
---|---|---|
committer | Riku Voipio <riku.voipio@linaro.org> | 2016-01-11 13:45:23 +0200 |
commit | fad6c58a3d2b7d4c20754b2b906927905db13392 (patch) | |
tree | 7689ac62cdcceaec645fc1988f5dccf1d6777beb /linux-user | |
parent | c0d35736323e5b638aac45bfc25f74fa7b6e10f1 (diff) | |
download | qemu-fad6c58a3d2b7d4c20754b2b906927905db13392.zip qemu-fad6c58a3d2b7d4c20754b2b906927905db13392.tar.gz qemu-fad6c58a3d2b7d4c20754b2b906927905db13392.tar.bz2 |
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>
Diffstat (limited to 'linux-user')
-rw-r--r-- | linux-user/syscall.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index d1eb3eb..11b72e1 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; } |