Win fixes
This commit is contained in:
@@ -59,8 +59,10 @@
|
|||||||
#define IPPROTO_SCTP 132
|
#define IPPROTO_SCTP 132
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__MINGW32__) || defined(__MINGW64__)
|
||||||
#undef gettimeofday
|
#undef gettimeofday
|
||||||
#define gettimeofday mingw_gettimeofday
|
#define gettimeofday mingw_gettimeofday
|
||||||
|
#endif
|
||||||
|
|
||||||
extern char* strsep(char **sp, char *sep);
|
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 strtok_r strtok_s
|
||||||
#define timegm _mkgmtime
|
#define timegm _mkgmtime
|
||||||
|
|
||||||
static inline struct tm * localtime_r(const time_t *timep, struct tm * result)
|
extern struct tm* localtime_r(const time_t* timep, struct tm* r);
|
||||||
{
|
|
||||||
struct tm *timeinfo;
|
|
||||||
timeinfo = localtime(timep);
|
|
||||||
return timeinfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* __NDPI_WIN32_H__ */
|
#endif /* __NDPI_WIN32_H__ */
|
||||||
|
|||||||
@@ -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)
|
if(src)
|
||||||
memcpy(dst, src, len);
|
memcpy(dst, src, len);
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1802,3 +1802,4 @@ u_int32_t ndpi_quick_16_byte_hash(u_int8_t *in_16_bytes_long) {
|
|||||||
return((u_int32_t)a);
|
return((u_int32_t)a);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ******************************************************************** */
|
||||||
|
|||||||
Reference in New Issue
Block a user