From 2646edc129c7e6a6f9c820c9ecc01ce450e09a58 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Mon, 14 Jul 2014 15:25:50 +0200 Subject: [PATCH] Profiling: fix compilation on CentOS5 Bug #1207 --- src/util-profiling.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/util-profiling.c b/src/util-profiling.c index f85b64c98a..faa0592cbe 100644 --- a/src/util-profiling.c +++ b/src/util-profiling.c @@ -97,7 +97,7 @@ char *profiling_csv_file_name; const char *profiling_packets_file_mode = "a"; static int rate = 1; -static SC_ATOMIC_DECL_AND_INIT(uint64_t, samples); +static SC_ATOMIC_DECLARE(uint64_t, samples); /** * Used as a check so we don't double enter a profiling run. @@ -126,6 +126,8 @@ SCProfilingInit(void) { ConfNode *conf; + SC_ATOMIC_INIT(samples); + intmax_t rate_v = 0; (void)ConfGetInt("profiling.sample-rate", &rate_v); if (rate_v > 0 && rate_v < INT_MAX) {