Skip to content

Commit

Permalink
misc: fix build of rules profiling
Browse files Browse the repository at this point in the history
The patch a0fc2b8 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.
  • Loading branch information
regit committed Oct 25, 2024
1 parent 89aa525 commit 9ffb2cd
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/util-profiling.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 *);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 9ffb2cd

Please sign in to comment.