From 8e1a3f5cdcdb7b18494662f8c11e78a2ee2417ed Mon Sep 17 00:00:00 2001 From: Luca Deri Date: Sat, 26 Sep 2020 12:50:30 +0200 Subject: Added JSON-C check for unit tests --- tests/unit/unit.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tests/unit') diff --git a/tests/unit/unit.c b/tests/unit/unit.c index 9def14fc7..263f6d80f 100644 --- a/tests/unit/unit.c +++ b/tests/unit/unit.c @@ -52,17 +52,20 @@ #include #include -#include "json.h" - #include "ndpi_config.h" #include "ndpi_api.h" +#ifdef HAVE_JSON_H +#include "json.h" /* JSON-C */ +#endif + static struct ndpi_detection_module_struct *ndpi_info_mod = NULL; static int verbose = 0; /* *********************************************** */ int serializerUnitTest() { +#ifdef HAVE_JSON_H ndpi_serializer serializer, deserializer; int i, loop_id; u_int8_t verbose = 0; @@ -220,6 +223,7 @@ int serializerUnitTest() { } printf("%s OK\n", __FUNCTION__); +#endif return 0; } -- cgit v1.2.3