aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2015-05-18 16:17:23 +0200
committerLuca Deri <deri@ntop.org>2015-05-18 16:17:23 +0200
commit64121162dd3262eec5d2ebca8b7a3be97f2c552c (patch)
treef2046094b8a942d6b63eef7be76340372ffce36e /src/lib
parent079a42c7525f14bb6dd3c39e9308c3f6600cd4f0 (diff)
Win32 fix
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/third_party/include/ndpi_patricia.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/third_party/include/ndpi_patricia.h b/src/lib/third_party/include/ndpi_patricia.h
index bf4a86259..651e52fc9 100644
--- a/src/lib/third_party/include/ndpi_patricia.h
+++ b/src/lib/third_party/include/ndpi_patricia.h
@@ -44,7 +44,7 @@
#ifndef WIN32
#define PATRICIA_IPV6 HAVE_IPV6
#else
-#define PATRICIA_IPV6 0
+#undef PATRICIA_IPV6
#endif
/* typedef unsigned int u_int; */
@@ -142,7 +142,11 @@ void ndpi_Clear_Patricia (patricia_tree_t *patricia, void_fn_t func);
void ndpi_Destroy_Patricia (patricia_tree_t *patricia, void_fn_t func);
void ndpi_patricia_process (patricia_tree_t *patricia, void_fn2_t func);
+#ifdef WIN32
+#define PATRICIA_MAXBITS 128
+#else
#define PATRICIA_MAXBITS (sizeof(struct in6_addr) * 8)
+#endif
#define PATRICIA_NBIT(x) (0x80 >> ((x) & 0x7f))
#define PATRICIA_NBYTE(x) ((x) >> 3)