aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/ndpi_main.h4
-rw-r--r--src/lib/third_party/src/ahocorasick.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/include/ndpi_main.h b/src/include/ndpi_main.h
index 9029265bb..66567d871 100644
--- a/src/include/ndpi_main.h
+++ b/src/include/ndpi_main.h
@@ -25,6 +25,10 @@
#define __NDPI_MAIN_H__
#include "ndpi_includes.h"
+#ifdef NDPI_LIB_COMPILATION
+/* for macros NDPI_LOG_* in ndpi_define.h */
+#include "ndpi_config.h"
+#endif
#include "ndpi_define.h"
#include "ndpi_protocol_ids.h"
#include "ndpi_typedefs.h"
diff --git a/src/lib/third_party/src/ahocorasick.c b/src/lib/third_party/src/ahocorasick.c
index 39b08443b..aefd7ae03 100644
--- a/src/lib/third_party/src/ahocorasick.c
+++ b/src/lib/third_party/src/ahocorasick.c
@@ -798,7 +798,7 @@ static void node_release(AC_NODE_t * thiz, int free_pattern)
/* Nonzero if X is not aligned on a "long" boundary. */
#undef UNALIGNED /* Windows defined it but differently from what Aho expects */
-#define UNALIGNED(X) ((long)X & (__SIZEOF_LONG__ - 1))
+#define UNALIGNED(X) ((intptr_t)X & (__SIZEOF_LONG__ - 1))
#define LBLOCKSIZE __SIZEOF_LONG__