Commit f5b122688b8d7912e7094be60cca4d3a2ee5a3e7
1 parent
62724a37
Windows sockets like to be different. Inspired by a patch from Alex Consul.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2535 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
8 additions
and
0 deletions
vl.c
| ... | ... | @@ -2850,6 +2850,10 @@ static CharDriverState *qemu_chr_open_tcp(const char *host_str, |
| 2850 | 2850 | if (err == EINTR || err == EWOULDBLOCK) { |
| 2851 | 2851 | } else if (err == EINPROGRESS) { |
| 2852 | 2852 | break; |
| 2853 | +#ifdef _WIN32 | |
| 2854 | + } else if (err == WSAEALREADY) { | |
| 2855 | + break; | |
| 2856 | +#endif | |
| 2853 | 2857 | } else { |
| 2854 | 2858 | goto fail; |
| 2855 | 2859 | } |
| ... | ... | @@ -4017,6 +4021,10 @@ static int net_socket_connect_init(VLANState *vlan, const char *host_str) |
| 4017 | 4021 | if (err == EINTR || err == EWOULDBLOCK) { |
| 4018 | 4022 | } else if (err == EINPROGRESS) { |
| 4019 | 4023 | break; |
| 4024 | +#ifdef _WIN32 | |
| 4025 | + } else if (err == WSAEALREADY) { | |
| 4026 | + break; | |
| 4027 | +#endif | |
| 4020 | 4028 | } else { |
| 4021 | 4029 | perror("connect"); |
| 4022 | 4030 | closesocket(fd); | ... | ... |