Move the configure include file inclusion and code depending on it in code protected by the NDPI_LIB_COMPILATION define, this should avoid it polluting the environment when including this file from ntopng.

This commit is contained in:
Guido Falsi
2018-08-27 17:45:38 +02:00
parent a98c0a81be
commit 396e72f4fe
2 changed files with 16 additions and 11 deletions
+16
View File
@@ -854,6 +854,22 @@ typedef struct ndpi_proto {
#ifdef NDPI_LIB_COMPILATION
/* Needed to have access to HAVE_* defines */
#include "ndpi_config.h"
#ifdef HAVE_HYPERSCAN
struct hs_list {
char *expression;
unsigned int id;
struct hs_list *next;
};
struct hs {
hs_database_t *database;
hs_scratch_t *scratch;
};
#endif
struct ndpi_detection_module_struct {
NDPI_PROTOCOL_BITMASK detection_bitmask;
NDPI_PROTOCOL_BITMASK generic_http_packet_bitmask;
-11
View File
@@ -49,17 +49,6 @@
#ifdef HAVE_HYPERSCAN
#include <hs/hs.h>
struct hs_list {
char *expression;
unsigned int id;
struct hs_list *next;
};
struct hs {
hs_database_t *database;
hs_scratch_t *scratch;
};
#endif
#define NDPI_CONST_GENERIC_PROTOCOL_NAME "GenericProtocol"