diff options
author | Luca Deri <lucaderi@users.noreply.github.com> | 2018-08-30 11:28:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-30 11:28:41 +0200 |
commit | 4a2525241f4c395811f21c540934c55be8b75539 (patch) | |
tree | 4ab96fc8bdfe916501b6169e35cfba76f427e892 | |
parent | ed5b04791ef1e8910fcdae7c6787510ad1cd287c (diff) | |
parent | 396e72f4fe79f9579f36a0ec963e12c29fddb0d1 (diff) |
Merge pull request #598 from madpilot78/include_hyperscan_fix
Move the configure include file inclusion and code depending on it in…
-rw-r--r-- | src/include/ndpi_typedefs.h | 16 | ||||
-rw-r--r-- | src/lib/ndpi_main.c | 11 |
2 files changed, 16 insertions, 11 deletions
diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h index 0e069ae77..c4df5b030 100644 --- a/src/include/ndpi_typedefs.h +++ b/src/include/ndpi_typedefs.h @@ -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; diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index b5d587dce..557c5b455 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -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" |