Win32 compilation fixes
This commit is contained in:
@@ -1833,6 +1833,22 @@ u_int ndpi_get_num_supported_protocols(struct ndpi_detection_module_struct *ndpi
|
||||
|
||||
/* ******************************************************************** */
|
||||
|
||||
#ifdef WIN32
|
||||
char * strsep(char **sp, char *sep)
|
||||
{
|
||||
char *p, *s;
|
||||
if (sp == NULL || *sp == NULL || **sp == '\0') return(NULL);
|
||||
s = *sp;
|
||||
p = s + strcspn(s, sep);
|
||||
if (*p != '\0') *p++ = '\0';
|
||||
*sp = p;
|
||||
return(s);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* ******************************************************************** */
|
||||
|
||||
|
||||
int ndpi_handle_rule(struct ndpi_detection_module_struct *ndpi_mod, char* rule, u_int8_t do_add) {
|
||||
char *at, *proto, *elem;
|
||||
ndpi_proto_defaults_t *def;
|
||||
|
||||
Reference in New Issue
Block a user