1
0
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:
Georg Richter
2022-01-03 06:34:59 +01:00
parent 510c7e5dfe
commit dae2d119a2
2 changed files with 6 additions and 1 deletions

View File

@@ -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

View File

@@ -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;
}