diff --git a/src/detect-engine-profile.c b/src/detect-engine-profile.c index f512765723..c602417929 100644 --- a/src/detect-engine-profile.c +++ b/src/detect-engine-profile.c @@ -32,6 +32,7 @@ #include "util-print.h" #ifdef PROFILING +#ifdef HAVE_LIBJANSSON static void DumpFp(const SigMatch *sm, char *pat_orig, uint32_t pat_orig_sz, char *pat_chop, uint32_t pat_chop_sz) { int fast_pattern_chop_set = 0; @@ -133,4 +134,5 @@ void RulesDumpMatchArray(const DetectEngineThreadCtx *det_ctx, const Packet *p) json_object_clear(js); json_decref(js); } +#endif /* HAVE_LIBJANSSON */ #endif /* PROFILING */ diff --git a/src/detect.c b/src/detect.c index 9fb005fcf1..f6296044e8 100644 --- a/src/detect.c +++ b/src/detect.c @@ -1516,8 +1516,10 @@ int SigMatchSignatures(ThreadVars *th_v, DetectEngineCtx *de_ctx, DetectEngineTh SGH_PROFILING_RECORD(det_ctx, det_ctx->sgh); #ifdef PROFILING +#ifdef HAVE_LIBJANSSON if (match_cnt >= de_ctx->profile_match_logging_threshold) RulesDumpMatchArray(det_ctx, p); +#endif #endif uint32_t sflags, next_sflags = 0;