From d67d3eed3cbe658bb580f5d2017a188cb75f707e Mon Sep 17 00:00:00 2001 From: Luca Deri Date: Fri, 26 May 2017 12:11:37 +0200 Subject: Compilation fix for systems that do not have JSON-C installed --- example/ndpiReader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'example') diff --git a/example/ndpiReader.c b/example/ndpiReader.c index 92bebc0d2..b76d66f34 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -1321,11 +1321,11 @@ static int getTopStats(struct top_stats **topStats, struct port_stats *stats, u_ /* *********************************************** */ +#ifdef HAVE_JSON_C /* * @brief Save Top Stats in json format */ static void saveTopStats(json_object **jObj_group, struct top_stats *stats, int direction, u_int64_t total_ip_addr){ -#ifdef HAVE_JSON_C struct top_stats *s, *tmp; json_object *jArray_stats = json_object_new_array(); int i = 0; @@ -1374,8 +1374,8 @@ static void saveTopStats(json_object **jObj_group, struct top_stats *stats, int json_object_object_add(*jObj_group, (direction == DIR_SRC) ? "top.src.ip.stats" : "top.dst.ip.stats", jArray_stats); -#endif } +#endif /* *********************************************** */ -- cgit v1.2.3