Fixes broken hyperscan compilation

This commit is contained in:
Simone Mainardi
2018-09-11 10:43:04 +02:00
parent b9ae0f8888
commit 6ac83ce7eb
4 changed files with 4 additions and 5 deletions
+1
View File
@@ -74,6 +74,7 @@ if test "${with_hyperscan+set}" = set; then
AC_CHECK_LIB([stdc++], [main]) AC_CHECK_LIB([stdc++], [main])
HS_INC=`pkg-config --cflags libhs` HS_INC=`pkg-config --cflags libhs`
HS_LIB=`pkg-config --libs libhs` HS_LIB=`pkg-config --libs libhs`
LDFLAGS="$LDFLAGS $HS_LIB"
else else
AC_MSG_RESULT([Intel Hyperscan not found, exiting. See https://github.com/intel/hyperscan/blob/master/doc/dev-reference/getting_started.rst for install/build instructions]) AC_MSG_RESULT([Intel Hyperscan not found, exiting. See https://github.com/intel/hyperscan/blob/master/doc/dev-reference/getting_started.rst for install/build instructions])
exit 1 exit 1
+1 -1
View File
@@ -7,7 +7,7 @@ OBJS=ndpiReader.o ndpi_util.o
all: ndpiReader all: ndpiReader
ndpiReader: $(OBJS) $(LIBNDPI) ndpiReader: $(OBJS) $(LIBNDPI)
$(CC) $(CFLAGS) $(OBJS) -o $@ $(LDFLAGS) $(CXX) $(CFLAGS) $(OBJS) -o $@ $(LDFLAGS)
%.o: %.c $(HEADERS) Makefile %.o: %.c $(HEADERS) Makefile
$(CC) $(CFLAGS) -c $< -o $@ $(CC) $(CFLAGS) -c $< -o $@
+2
View File
@@ -858,6 +858,8 @@ typedef struct ndpi_proto {
#include "ndpi_config.h" #include "ndpi_config.h"
#ifdef HAVE_HYPERSCAN #ifdef HAVE_HYPERSCAN
#include <hs/hs.h>
struct hs_list { struct hs_list {
char *expression; char *expression;
unsigned int id; unsigned int id;
-4
View File
@@ -47,10 +47,6 @@
#include "third_party/include/hash.h" #include "third_party/include/hash.h"
/* #include "third_party/src/hash.c" */ /* #include "third_party/src/hash.c" */
#ifdef HAVE_HYPERSCAN
#include <hs/hs.h>
#endif
#define NDPI_CONST_GENERIC_PROTOCOL_NAME "GenericProtocol" #define NDPI_CONST_GENERIC_PROTOCOL_NAME "GenericProtocol"
static int _ndpi_debug_callbacks = 0; static int _ndpi_debug_callbacks = 0;