Win fixes

This commit is contained in:
Luca Deri
2020-12-17 15:34:17 +01:00
parent df1b3367a9
commit b231982286
3 changed files with 5 additions and 7 deletions
+3 -6
View File
@@ -59,8 +59,10 @@
#define IPPROTO_SCTP 132
#endif
#if defined(__MINGW32__) || defined(__MINGW64__)
#undef gettimeofday
#define gettimeofday mingw_gettimeofday
#endif
extern char* strsep(char **sp, char *sep);
@@ -93,11 +95,6 @@ extern unsigned long waitForNextEvent(unsigned long ulDelay /* ms */);
#define strtok_r strtok_s
#define timegm _mkgmtime
static inline struct tm * localtime_r(const time_t *timep, struct tm * result)
{
struct tm *timeinfo;
timeinfo = localtime(timep);
return timeinfo;
}
extern struct tm* localtime_r(const time_t* timep, struct tm* r);
#endif /* __NDPI_WIN32_H__ */
+1 -1
View File
@@ -70,7 +70,7 @@
/* **************************************************** */
static ssize_t ndpi_community_id_buf_copy(u_int8_t * const dst, const void * const src, ssize_t len) {
static u_int16_t ndpi_community_id_buf_copy(u_int8_t * const dst, const void * const src, u_int16_t len) {
if(src)
memcpy(dst, src, len);
else
+1
View File
@@ -1802,3 +1802,4 @@ u_int32_t ndpi_quick_16_byte_hash(u_int8_t *in_16_bytes_long) {
return((u_int32_t)a);
}
/* ******************************************************************** */