You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-08 14:02:17 +03:00
Windows build fixes
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include <windows.h>
|
||||
#include <stdlib.h>
|
||||
#define strcasecmp _stricmp
|
||||
#define strtok_r strtok_s
|
||||
#define sleep(x) Sleep(1000*(x))
|
||||
#ifdef _MSC_VER
|
||||
#define inline __inline
|
||||
|
@@ -28,6 +28,10 @@
|
||||
#include <zlib.h>
|
||||
#include <mariadb_rpl.h>
|
||||
|
||||
#ifdef WIN32
|
||||
#define alloca _alloca
|
||||
#endif
|
||||
|
||||
static int rpl_alloc_string(MARIADB_RPL_EVENT *event,
|
||||
MARIADB_STRING *s,
|
||||
unsigned char *buffer,
|
||||
@@ -120,7 +124,7 @@ static int ma_set_rpl_filename(MARIADB_RPL *rpl, const unsigned char *filename,
|
||||
if (!(rpl->filename= (char *)malloc(len)))
|
||||
return 1;
|
||||
memcpy(rpl->filename, filename, len);
|
||||
rpl->filename_length= len;
|
||||
rpl->filename_length= (uint32_t)len;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user