]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
misc: fix build of rules profiling 12039/head
authorEric Leblond <el@stamus-networks.com>
Fri, 25 Oct 2024 21:34:53 +0000 (23:34 +0200)
committerEric Leblond <el@stamus-networks.com>
Fri, 25 Oct 2024 21:41:17 +0000 (23:41 +0200)
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

index 468012df60866c74cd6eee1111ccdffabd878128..1c334bb34f2703c8b6cfad94b5176db9e4e81516 100644 (file)
@@ -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);