diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/ndpi_define.h.in | 4 | ||||
-rw-r--r-- | src/include/ndpi_includes_OpenBSD.h | 4 | ||||
-rw-r--r-- | src/include/ndpi_utils.h | 5 | ||||
-rw-r--r-- | src/include/ndpi_win32.h | 6 |
4 files changed, 5 insertions, 14 deletions
diff --git a/src/include/ndpi_define.h.in b/src/include/ndpi_define.h.in index 13e9962da..d34f8672d 100644 --- a/src/include/ndpi_define.h.in +++ b/src/include/ndpi_define.h.in @@ -330,10 +330,6 @@ static inline u_int64_t get_u_int64_t(const u_int8_t* X, int O) /* define memory callback function */ #define match_first_bytes(payload,st) (memcmp((payload),(st),(sizeof(st)-1))==0) -#if defined(WIN32) && !defined(snprintf) -#define snprintf _snprintf -#endif - #if defined(WIN32) #undef strtok_r #define strtok_r strtok_s diff --git a/src/include/ndpi_includes_OpenBSD.h b/src/include/ndpi_includes_OpenBSD.h index 65716c8f3..80c3e65cc 100644 --- a/src/include/ndpi_includes_OpenBSD.h +++ b/src/include/ndpi_includes_OpenBSD.h @@ -24,10 +24,6 @@ #ifndef __NDPI_INCLUDES_OPENBSD_H__ #define __NDPI_INCLUDES_OPENBSD_H__ -#ifndef IPPROTO_SCTP -#define IPPROTO_SCTP 132 -#endif /* IPPROTO_SCTP */ - #include <net/bpf.h> typedef struct bpf_timeval pkt_timeval; diff --git a/src/include/ndpi_utils.h b/src/include/ndpi_utils.h index d6596ae1f..c6605528b 100644 --- a/src/include/ndpi_utils.h +++ b/src/include/ndpi_utils.h @@ -32,4 +32,9 @@ extern u_int8_t ndpi_ends_with(char *str, char *ends); ((ch) >= '[' && (ch) <= '`') || \ ((ch) >= '{' && (ch) <= '~')) +#ifndef NDPI_CFFI_PREPROCESSING +int ndpi_vsnprintf(char * str, size_t size, char const * format, va_list va_args); +int ndpi_snprintf(char * str, size_t size, char const * format, ...); +#endif + #endif diff --git a/src/include/ndpi_win32.h b/src/include/ndpi_win32.h index 00bebe6ca..7885b13ef 100644 --- a/src/include/ndpi_win32.h +++ b/src/include/ndpi_win32.h @@ -47,18 +47,12 @@ #define _CRT_SECURE_NO_WARNINGS #endif -#define _WS2TCPIP_H_ /* Avoid compilation problems */ - #define IPVERSION 4 /* on *nix it is defined in netinet/ip.h */ #ifndef MIN #define MIN(X, Y) (((X) < (Y)) ? (X) : (Y)) #endif -#ifndef IPPROTO_SCTP -#define IPPROTO_SCTP 132 -#endif - #if defined(__MINGW32__) || defined(__MINGW64__) #undef gettimeofday #define gettimeofday mingw_gettimeofday |