slirp: Fix non blocking connect for w32
authorStefan Weil <sw@weilnetz.de>
Thu, 30 Jul 2015 21:08:12 +0000 (23:08 +0200)
committerStefan Weil <sw@weilnetz.de>
Thu, 24 Sep 2015 18:52:28 +0000 (20:52 +0200)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
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)));