Win fixes

This commit is contained in:
Luca Deri 2020-03-12 11:26:38 +01:00
parent 942a71c7eb
commit 1e933e8b02
3 changed files with 5 additions and 3 deletions

View file

@ -876,7 +876,7 @@ extern "C" {
void ndpi_user_pwd_payload_copy(u_int8_t *dest, u_int dest_len, u_int offset,
const u_int8_t *src, u_int src_len);
u_char* ndpi_base64_decode(const u_char *src, size_t len, size_t *out_len);
char* ndpi_base64_encode(unsigned char const* bytes_to_encode, ssize_t in_len);
char* ndpi_base64_encode(unsigned char const* bytes_to_encode, size_t in_len);
int ndpi_load_ipv4_ptree(struct ndpi_detection_module_struct *ndpi_str,
const char *path, u_int16_t protocol_id);

View file

@ -76,7 +76,9 @@ typedef unsigned __int64 u_int64_t;
extern unsigned long waitForNextEvent(unsigned long ulDelay /* ms */);
#define sleep(a /* sec */) waitForNextEvent(1000*a /* ms */)
#ifndef localtime_r
#define localtime_r(a, b) localtime_s(b, a)
#endif
#define strtok_r strtok_s
#define timegm _mkgmtime

View file

@ -854,8 +854,8 @@ u_char* ndpi_base64_decode(const u_char *src, size_t len, size_t *out_len) {
/* ********************************** */
char* ndpi_base64_encode(unsigned char const* bytes_to_encode, ssize_t in_len) {
ssize_t len = 0, ret_size;
char* ndpi_base64_encode(unsigned char const* bytes_to_encode, size_t in_len) {
size_t len = 0, ret_size;
char *ret;
int i = 0;
unsigned char char_array_3[3];