From: Stefan Weil Date: Thu, 30 Jul 2015 21:08:12 +0000 (+0200) Subject: slirp: Fix non blocking connect for w32 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=a246a01631f90230374c2b8ffce608232e2aa654;p=qemu.git slirp: Fix non blocking connect for w32 Signed-off-by: Stefan Weil --- diff --git a/slirp/tcp_input.c b/slirp/tcp_input.c index f946db8dc0..00a77b4a5f 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)));