summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <knielsen@mysql.com>2006-01-04 16:38:54 +0100
committerunknown <knielsen@mysql.com>2006-01-04 16:38:54 +0100
commita6b0029f4d446adc730b09206b9cd838b0da3f7c (patch)
treeb3542061398ce79359db4a784e1fb6b15fba7e5a
parente1fdf8b4f9b47aa5fc2590961c1f21e87b562824 (diff)
downloadmariadb-git-a6b0029f4d446adc730b09206b9cd838b0da3f7c.tar.gz
EADDRINUSE is not defined on Windows.
-rw-r--r--include/my_global.h3
-rw-r--r--sql/mysqld.cc2
2 files changed, 4 insertions, 1 deletions
diff --git a/include/my_global.h b/include/my_global.h
index e62f6c269aa..0df9ac78eb2 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -862,6 +862,7 @@ typedef off_t os_off_t;
#define SOCKET_EAGAIN WSAEINPROGRESS
#define SOCKET_ETIMEDOUT WSAETIMEDOUT
#define SOCKET_EWOULDBLOCK WSAEWOULDBLOCK
+#define SOCKET_EADDRINUSE WSAEADDRINUSE
#define SOCKET_ENFILE ENFILE
#define SOCKET_EMFILE EMFILE
#elif defined(OS2)
@@ -870,6 +871,7 @@ typedef off_t os_off_t;
#define SOCKET_EAGAIN SOCEINPROGRESS
#define SOCKET_ETIMEDOUT SOCKET_EINTR
#define SOCKET_EWOULDBLOCK SOCEWOULDBLOCK
+#define SOCKET_EADDRINUSE SOCEADDRINUSE
#define SOCKET_ENFILE SOCENFILE
#define SOCKET_EMFILE SOCEMFILE
#define closesocket(A) soclose(A)
@@ -880,6 +882,7 @@ typedef off_t os_off_t;
#define SOCKET_EAGAIN EAGAIN
#define SOCKET_ETIMEDOUT SOCKET_EINTR
#define SOCKET_EWOULDBLOCK EWOULDBLOCK
+#define SOCKET_EADDRINUSE EADDRINUSE
#define SOCKET_ENFILE ENFILE
#define SOCKET_EMFILE EMFILE
#endif
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 14cbaf28ae3..8934b872c94 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -1401,7 +1401,7 @@ static void network_init(void)
{
if (((ret= bind(ip_sock, my_reinterpret_cast(struct sockaddr *) (&IPaddr),
sizeof(IPaddr))) >= 0) ||
- (socket_errno != EADDRINUSE) ||
+ (socket_errno != SOCKET_EADDRINUSE) ||
(waited >= mysqld_port_timeout))
break;
sql_print_information("Retrying bind on TCP/IP port %u", mysqld_port);