summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2010-01-13 16:20:56 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2010-01-13 17:22:33 -0600
commita3441a43a668c0dc31ca4c8b2d236e053d29b8da (patch)
tree0929b092ff9353502db5566a96e11ef077385978 /osdep.c
parentpc: add rombar to compat properties for pc-0.10 and pc-0.11 (diff)
downloadqemu-kvm-a3441a43a668c0dc31ca4c8b2d236e053d29b8da.tar.gz
qemu-kvm-a3441a43a668c0dc31ca4c8b2d236e053d29b8da.tar.bz2
qemu-kvm-a3441a43a668c0dc31ca4c8b2d236e053d29b8da.zip
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> (cherry picked from commit 347ed55cd109864b02dd29bb7e6cda1622e8019e)
Diffstat (limited to 'osdep.c')
-rw-r--r--osdep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/osdep.c b/osdep.c
index 9949606bb..60469eda8 100644
--- a/osdep.c
+++ b/osdep.c
@@ -306,7 +306,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