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, version against stable branch.
This commit is contained in:
@@ -26,9 +26,6 @@
|
||||
|
||||
#include "ndpi_define.h"
|
||||
|
||||
/* Needed to have access to HAVE_* defines */
|
||||
#include "ndpi_config.h"
|
||||
|
||||
/* NDPI_LOG_LEVEL */
|
||||
typedef enum {
|
||||
NDPI_LOG_ERROR,
|
||||
@@ -854,7 +851,17 @@ typedef struct ndpi_proto {
|
||||
#define NUM_CUSTOM_CATEGORIES 5
|
||||
#define CUSTOM_CATEGORY_LABEL_LEN 32
|
||||
|
||||
#ifdef NDPI_LIB_COMPILATION
|
||||
|
||||
/* Needed to have access to HAVE_* defines */
|
||||
#include "ndpi_define.h"
|
||||
|
||||
#ifdef HAVE_HYPERSCAN
|
||||
struct hs {
|
||||
hs_database_t *database;
|
||||
hs_scratch_t *scratch;
|
||||
};
|
||||
|
||||
struct hs_list {
|
||||
char *expression;
|
||||
unsigned int id;
|
||||
@@ -862,8 +869,6 @@ struct hs_list {
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef NDPI_LIB_COMPILATION
|
||||
|
||||
struct ndpi_detection_module_struct {
|
||||
NDPI_PROTOCOL_BITMASK detection_bitmask;
|
||||
NDPI_PROTOCOL_BITMASK generic_http_packet_bitmask;
|
||||
|
||||
@@ -51,13 +51,6 @@
|
||||
#include <hs/hs.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_HYPERSCAN
|
||||
struct hs {
|
||||
hs_database_t *database;
|
||||
hs_scratch_t *scratch;
|
||||
};
|
||||
#endif
|
||||
|
||||
#define NDPI_CONST_GENERIC_PROTOCOL_NAME "GenericProtocol"
|
||||
|
||||
static int _ndpi_debug_callbacks = 0;
|
||||
|
||||
Reference in New Issue
Block a user