diff options
author | Stefan Weil <sw@weilnetz.de> | 2015-07-30 23:08:12 +0200 |
---|---|---|
committer | Stefan Weil <sw@weilnetz.de> | 2015-09-24 20:52:28 +0200 |
commit | c91a2b71b4fd62dfa8ca98b217334b946aa69ee3 (patch) | |
tree | 9c474342712903245e3089815ecdd065c9e6cbe0 /tcp_input.c | |
parent | dd94020cca59925585c39414929b1eb5079bb11d (diff) | |
download | slirp-c91a2b71b4fd62dfa8ca98b217334b946aa69ee3.zip slirp-c91a2b71b4fd62dfa8ca98b217334b946aa69ee3.tar.gz slirp-c91a2b71b4fd62dfa8ca98b217334b946aa69ee3.tar.bz2 |
slirp: Fix non blocking connect for w32
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Diffstat (limited to 'tcp_input.c')
-rw-r--r-- | tcp_input.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tcp_input.c b/tcp_input.c index e4f7bba..af46e36 100644 --- a/tcp_input.c +++ b/tcp_input.c @@ -581,8 +581,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))); |