]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
slirp: Fix non blocking connect for w32
authorStefan Weil <sw@weilnetz.de>
Thu, 30 Jul 2015 21:08:12 +0000 (23:08 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Wed, 21 Oct 2015 03:55:32 +0000 (22:55 -0500)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
(cherry picked from commit a246a01631f90230374c2b8ffce608232e2aa654)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
slirp/tcp_input.c

index f946db8dc07eaed24fa0f9ffffdd12a88c32ce76..00a77b4a5fadb78ba19cd05ffd71a2a4e2c9433f 100644 (file)
@@ -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)));