aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2019-08-29 15:35:29 +0200
committerLuca Deri <deri@ntop.org>2019-08-29 15:35:29 +0200
commit8b8fd2562622834d9a16ae871489be13f3b63191 (patch)
tree7ea4d445cccc7863de0079bbe4e796d1f1cd29e1 /example
parente98eb294c77f9cdf821c6562a4e629f0bcd5ae45 (diff)
Compilation fix on systems without JSON-C
Diffstat (limited to 'example')
-rw-r--r--example/ndpiReader.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c
index 625701a70..20518c446 100644
--- a/example/ndpiReader.c
+++ b/example/ndpiReader.c
@@ -1839,6 +1839,7 @@ static void json_init() {
/* *********************************************** */
+#ifdef HAVE_JSON_C
/**
* @brief JSON destroy function
*/
@@ -1847,6 +1848,7 @@ static void json_destroy() {
json_object_put(jArray_unknown_flows);
json_object_put(jArray_topStats);
}
+#endif
/* *********************************************** */
@@ -3263,7 +3265,9 @@ void test_lib() {
terminateDetection(thread_id);
}
+#ifdef HAVE_JSON_C
json_destroy();
+#endif
}
/* *********************************************** */