Win32 compilation fixes

This commit is contained in:
Luca Deri
2015-11-26 23:47:55 +01:00
parent 98ef945d2e
commit cb68d4d00a
7 changed files with 51 additions and 15 deletions
+6
View File
@@ -54,8 +54,10 @@
#endif
#ifdef WIN32
#ifndef __LITTLE_ENDIAN__
#define __LITTLE_ENDIAN__ 1
#endif
#endif
#if !(defined(__LITTLE_ENDIAN__) || defined(__BIG_ENDIAN__))
#if defined(__mips__)
@@ -286,4 +288,8 @@
/* define memory callback function */
#define match_first_bytes(payload,st) (memcmp((payload),(st),(sizeof(st)-1))==0)
#ifdef WIN32
#define snprintf(buf,len, format,...) _snprintf_s(buf, len,len, format, __VA_ARGS__)
#endif
#endif /* __NDPI_DEFINE_INCLUDE_FILE__ */