提交 eadfa019 编写于 作者: D Dr. Stephen Henson

fix PR#2261 in a different way

上级 97999375
......@@ -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)
......
......@@ -150,10 +150,6 @@ extern "C" {
#define clear_socket_error() WSASetLastError(0)
#define readsocket(s,b,n) recv((s),(b),(n),0)
#define writesocket(s,b,n) send((s),(b),(n),0)
#ifdef EADDRINUSE
#undef EADDRINUSE
#endif
#define EADDRINUSE WSAEADDRINUSE
#elif defined(__DJGPP__)
#define WATT32
#define get_last_socket_error() errno
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册