From: Kevin Wolf Date: Wed, 13 Jan 2010 15:20:56 +0000 (+0100) Subject: osdep.c: Fix accept4 fallback X-Git-Tag: v0.13.0-rc0~1701 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=347ed55cd109864b02dd29bb7e6cda1622e8019e;p=thirdparty%2Fqemu.git 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 Signed-off-by: Anthony Liguori --- diff --git a/osdep.c b/osdep.c index e4836e720c5..1310684e3c1 100644 --- a/osdep.c +++ b/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