summaryrefslogtreecommitdiff
path: root/sql/mini_client.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/mini_client.cc')
-rw-r--r--sql/mini_client.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/sql/mini_client.cc b/sql/mini_client.cc
index 83f68a28228..02a0156ce5b 100644
--- a/sql/mini_client.cc
+++ b/sql/mini_client.cc
@@ -545,10 +545,13 @@ mc_mysql_connect(MYSQL *mysql,const char *host, const char *user,
bzero((char*) &UNIXaddr,sizeof(UNIXaddr));
UNIXaddr.sun_family = AF_UNIX;
strmov(UNIXaddr.sun_path, unix_socket);
- if (mc_sock_connect(sock,(struct sockaddr *) &UNIXaddr, sizeof(UNIXaddr),
+ if (mc_sock_connect(sock,
+ my_reinterpret_cast(struct sockaddr *) (&UNIXaddr),
+ sizeof(UNIXaddr),
mysql->options.connect_timeout) <0)
{
- DBUG_PRINT("error",("Got error %d on connect to local server",socket_errno));
+ DBUG_PRINT("error",("Got error %d on connect to local server",
+ socket_errno));
net->last_errno=CR_CONNECTION_ERROR;
sprintf(net->last_error,ER(net->last_errno),unix_socket,socket_errno);
goto error;
@@ -635,7 +638,9 @@ mc_mysql_connect(MYSQL *mysql,const char *host, const char *user,
my_gethostbyname_r_free();
}
sock_addr.sin_port = (ushort) htons((ushort) port);
- if (mc_sock_connect(sock,(struct sockaddr *) &sock_addr, sizeof(sock_addr),
+ if (mc_sock_connect(sock,
+ my_reinterpret_cast(struct sockaddr *) (&sock_addr),
+ sizeof(sock_addr),
mysql->options.connect_timeout) <0)
{
DBUG_PRINT("error",("Got error %d on connect to '%s'",