From: Eric Leblond Date: Fri, 25 Oct 2024 21:34:53 +0000 (+0200) Subject: misc: fix build of rules profiling X-Git-Tag: suricata-8.0.0-beta1~750 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9ffb2cd7dde9da9e80a261fcecf49b074a3e064b;p=thirdparty%2Fsuricata.git 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. --- 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);