aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/bio/b_sock.c
diff options
context:
space:
mode:
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 ead477d8a29e..f0d9cfca67cc 100644
--- a/crypto/bio/b_sock.c
+++ b/crypto/bio/b_sock.c
@@ -659,7 +659,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
{
memcpy((char *)&client,(char *)&server,sizeof(server));
if (strcmp(h,"*") == 0)