Win fixes
This commit is contained in:
@@ -876,7 +876,7 @@ extern "C" {
|
|||||||
void ndpi_user_pwd_payload_copy(u_int8_t *dest, u_int dest_len, u_int offset,
|
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);
|
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);
|
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,
|
int ndpi_load_ipv4_ptree(struct ndpi_detection_module_struct *ndpi_str,
|
||||||
const char *path, u_int16_t protocol_id);
|
const char *path, u_int16_t protocol_id);
|
||||||
|
|
||||||
|
|||||||
@@ -76,7 +76,9 @@ typedef unsigned __int64 u_int64_t;
|
|||||||
extern unsigned long waitForNextEvent(unsigned long ulDelay /* ms */);
|
extern unsigned long waitForNextEvent(unsigned long ulDelay /* ms */);
|
||||||
|
|
||||||
#define sleep(a /* sec */) waitForNextEvent(1000*a /* ms */)
|
#define sleep(a /* sec */) waitForNextEvent(1000*a /* ms */)
|
||||||
|
#ifndef localtime_r
|
||||||
#define localtime_r(a, b) localtime_s(b, a)
|
#define localtime_r(a, b) localtime_s(b, a)
|
||||||
|
#endif
|
||||||
#define strtok_r strtok_s
|
#define strtok_r strtok_s
|
||||||
#define timegm _mkgmtime
|
#define timegm _mkgmtime
|
||||||
|
|
||||||
|
|||||||
@@ -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) {
|
char* ndpi_base64_encode(unsigned char const* bytes_to_encode, size_t in_len) {
|
||||||
ssize_t len = 0, ret_size;
|
size_t len = 0, ret_size;
|
||||||
char *ret;
|
char *ret;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
unsigned char char_array_3[3];
|
unsigned char char_array_3[3];
|
||||||
|
|||||||
Reference in New Issue
Block a user