aboutsummaryrefslogtreecommitdiff
path: root/openssl/crypto/bio/b_sock.c
diff options
context:
space:
mode:
Diffstat (limited to 'openssl/crypto/bio/b_sock.c')
-rw-r--r--openssl/crypto/bio/b_sock.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/openssl/crypto/bio/b_sock.c b/openssl/crypto/bio/b_sock.c
index 5ea621c0c..12b0a53a8 100644
--- a/openssl/crypto/bio/b_sock.c
+++ b/openssl/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)