summaryrefslogtreecommitdiffstats
path: root/crypto/bio/b_sock.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2010-05-31 13:18:08 +0000
committerDr. Stephen Henson <steve@openssl.org>2010-05-31 13:18:08 +0000
commit31c4ab5401969d44961f82c6b3f27ff695934685 (patch)
tree6fea2b2ea6e349aaf5fd8154357e67d51b9f8a37 /crypto/bio/b_sock.c
parent1f655298249354bb431806d8698a59f5247b88c8 (diff)
fix PR#2261 in a different way
Diffstat (limited to 'crypto/bio/b_sock.c')
-rw-r--r--crypto/bio/b_sock.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/crypto/bio/b_sock.c b/crypto/bio/b_sock.c
index 5ea621c0cf..12b0a53a81 100644
--- a/crypto/bio/b_sock.c
+++ b/crypto/bio/b_sock.c
@@ -731,7 +731,14 @@ again:
#ifdef SO_REUSEADDR
err_num=get_last_socket_error();
if ((bind_mode == BIO_BIND_REUSEADDR_IF_UNUSED) &&
+#ifdef OPENSSL_SYS_WINDOWS
+ /* Some versions of Windows define EADDRINUSE to
+ * a dummy value.
+ */
+ (err_num == WSAEADDRINUSE))
+#else
(err_num == EADDRINUSE))
+#endif
{
client = server;
if (h == NULL || strcmp(h,"*") == 0)