aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarryl Sokoloski <darryl@sokoloski.ca>2018-08-16 22:24:15 -0400
committerDarryl Sokoloski <darryl@sokoloski.ca>2018-08-16 22:24:15 -0400
commit06befec642103bb4b20be3ac9227fe42d92fde1b (patch)
tree1d4a2e80e0a6d8cc4c7d1a31f69510e7db2db20f
parent579f1b05dbc351f310cfbbb0ff01c0682bc7f4f0 (diff)
Remove autoconf include from typedefs headers.
Including this file in any "public" API header breaks all projects that also use autotools because macros such as PACKAGE_VERSION will be redefined. Signed-off-by: Darryl Sokoloski <darryl@sokoloski.ca>
-rw-r--r--src/include/ndpi_typedefs.h11
-rw-r--r--src/lib/ndpi_main.c8
2 files changed, 6 insertions, 13 deletions
diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h
index 1a9924d36..44248dfb9 100644
--- a/src/include/ndpi_typedefs.h
+++ b/src/include/ndpi_typedefs.h
@@ -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,14 +851,6 @@ typedef struct ndpi_proto {
#define NUM_CUSTOM_CATEGORIES 5
#define CUSTOM_CATEGORY_LABEL_LEN 32
-#ifdef HAVE_HYPERSCAN
-struct hs_list {
- char *expression;
- unsigned int id;
- struct hs_list *next;
-};
-#endif
-
#ifdef NDPI_LIB_COMPILATION
struct ndpi_detection_module_struct {
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
index 85cd4b9eb..8b99a9c95 100644
--- a/src/lib/ndpi_main.c
+++ b/src/lib/ndpi_main.c
@@ -48,9 +48,13 @@
#ifdef HAVE_HYPERSCAN
#include <hs/hs.h>
-#endif
-#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;