Skip to content

Commit

Permalink
Fix unit test.
Browse files Browse the repository at this point in the history
Fix send() prototype
  • Loading branch information
vaintroub committed Feb 14, 2018
1 parent 9b37839 commit 67cc343
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/pvio/pvio_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ static ssize_t ma_recv(my_socket socket, uchar *buffer, size_t length, int flags
{
ssize_t r;
do {
r = recv(socket, (const char *)buffer, IF_WIN((int)length, length), flags);
r = recv(socket, (char*) buffer, IF_WIN((int)length, length), flags);
}
while (r == -1 && IS_SOCKET_EINTR(socket_errno));
return r;
Expand Down
7 changes: 7 additions & 0 deletions unittest/libmariadb/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -981,8 +981,13 @@ static int test_sess_track_db(MYSQL *mysql)
return OK;
}


static int test_unix_socket_close(MYSQL *unused __attribute__((unused)))
{
#ifdef _WIN32
diag("test does not run on Windows");
return SKIP;
#else
MYSQL *mysql= mysql_init(NULL);
FILE *fp;
int i;
Expand All @@ -1007,8 +1012,10 @@ static int test_unix_socket_close(MYSQL *unused __attribute__((unused)))
}
mysql_close(mysql);
return OK;
#endif
}


static int test_reset(MYSQL *mysql)
{
int rc;
Expand Down

0 comments on commit 67cc343

Please sign in to comment.