mirror of
https://github.com/Motorhead1991/qemu.git
synced 2026-01-04 05:30:31 -07:00
osdep.c: Fix accept4 fallback
Commit 3a03bfa5 added a fallback in case the Linux kernel running qemu is older
than the kernel of the build system. Unfortunately, v1 was committed instead of
v2, so the code has a bug that was revealed in the review (checking for the
wrong error code).
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
3e85c6fd71
commit
347ed55cd1
1 changed files with 1 additions and 1 deletions
2
osdep.c
2
osdep.c
|
|
@ -297,7 +297,7 @@ int qemu_accept(int s, struct sockaddr *addr, socklen_t *addrlen)
|
|||
|
||||
#ifdef CONFIG_ACCEPT4
|
||||
ret = accept4(s, addr, addrlen, SOCK_CLOEXEC);
|
||||
if (ret != -1 || errno != EINVAL) {
|
||||
if (ret != -1 || errno != ENOSYS) {
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue