From 9ffb2cd7dde9da9e80a261fcecf49b074a3e064b Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Fri, 25 Oct 2024 23:34:53 +0200 Subject: [PATCH] misc: fix build of rules profiling The patch a0fc2b8628d8a281ef7a2943614b507498c80ca3 has removed the declaration of functions used when building with ruleset profiling only (without --enable-profiling). This is causing a build failure. This patch moves the declaration to the rules profiling section to be sure it is always there. --- src/util-profiling.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/util-profiling.h b/src/util-profiling.h index 468012df60..1c334bb34f 100644 --- a/src/util-profiling.h +++ b/src/util-profiling.h @@ -287,14 +287,6 @@ extern thread_local int profiling_prefilter_entered; (det_ctx)->prefilter_bytes += (bytes); \ (det_ctx)->prefilter_bytes_called++ -struct SCProfileDetectCtx_; -void SCProfilingRulesGlobalInit(void); -void SCProfilingRuleDestroyCtx(struct SCProfileDetectCtx_ *); -void SCProfilingRuleInitCounters(DetectEngineCtx *); -void SCProfilingRuleUpdateCounter(DetectEngineThreadCtx *, uint16_t, uint64_t, int); -void SCProfilingRuleThreadSetup(struct SCProfileDetectCtx_ *, DetectEngineThreadCtx *); -void SCProfilingRuleThreadCleanup(DetectEngineThreadCtx *); - void SCProfilingKeywordsGlobalInit(void); void SCProfilingKeywordDestroyCtx(DetectEngineCtx *);//struct SCProfileKeywordDetectCtx_ *); void SCProfilingKeywordInitCounters(DetectEngineCtx *); @@ -392,6 +384,12 @@ typedef struct SCProfileDetectCtx_ { pthread_mutex_t data_m; } SCProfileDetectCtx; +void SCProfilingRulesGlobalInit(void); +void SCProfilingRuleDestroyCtx(struct SCProfileDetectCtx_ *); +void SCProfilingRuleInitCounters(DetectEngineCtx *); +void SCProfilingRuleUpdateCounter(DetectEngineThreadCtx *, uint16_t, uint64_t, int); +void SCProfilingRuleThreadSetup(struct SCProfileDetectCtx_ *, DetectEngineThreadCtx *); +void SCProfilingRuleThreadCleanup(DetectEngineThreadCtx *); int SCProfileRuleStart(Packet *p); json_t *SCProfileRuleTriggerDump(DetectEngineCtx *de_ctx); void SCProfileRuleStartCollection(void);