Received: from eggs.gnu.org ([2001:4830:134:3::10]:40039) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcRxO-00041a-Jk for qemu-devel@nongnu.org; Thu, 17 Sep 2015 01:42:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZcRxN-0007mF-Q3 for qemu-devel@nongnu.org; Thu, 17 Sep 2015 01:42:06 -0400 Received: from qemu.weilnetz.de ([2a03:4000:2:362::1]:34302) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcRxN-0007ln-KM for qemu-devel@nongnu.org; Thu, 17 Sep 2015 01:42:05 -0400 From: Stefan Weil Date: Thu, 17 Sep 2015 07:41:52 +0200 Message-Id: <1442468512-23724-1-git-send-email-sw@weilnetz.de> Subject: [Qemu-devel] [PATCH] slirp: Fix non blocking connect for w32 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: QEMU Developer , QEMU Stable Cc: Jan Kiszka , Stefan Weil , Paolo Bonzini Signed-off-by: Stefan Weil --- This is a hack to fix networking for latest git master and stable. Regards Stefan slirp/tcp_input.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/slirp/tcp_input.c b/slirp/tcp_input.c index f946db8..00a77b4 100644 --- a/slirp/tcp_input.c +++ b/slirp/tcp_input.c @@ -584,7 +584,13 @@ findso: goto cont_input; } - if((tcp_fconnect(so) == -1) && (errno != EINPROGRESS) && (errno != EWOULDBLOCK)) { + if ((tcp_fconnect(so) == -1) && +#if defined(_WIN32) + socket_error() != WSAEWOULDBLOCK +#else + (errno != EINPROGRESS) && (errno != EWOULDBLOCK) +#endif + ) { u_char code=ICMP_UNREACH_NET; DEBUG_MISC((dfd, " tcp fconnect errno = %d-%s\n", errno,strerror(errno))); -- 2.1.4