diff options
Diffstat (limited to 'base/stats')
-rw-r--r-- | base/stats/events.cc | 7 | ||||
-rw-r--r-- | base/stats/events.hh | 5 |
2 files changed, 7 insertions, 5 deletions
diff --git a/base/stats/events.cc b/base/stats/events.cc index 8c3303a69..3191aec13 100644 --- a/base/stats/events.cc +++ b/base/stats/events.cc @@ -28,11 +28,12 @@ #include <vector> -#ifdef USE_MYSQL +#include "base/stats/events.hh" + +#if USE_MYSQL #include "base/cprintf.hh" #include "base/misc.hh" #include "base/mysql.hh" -#include "base/stats/events.hh" #include "base/stats/mysql.hh" #include "base/stats/mysql_run.hh" #include "base/str.hh" @@ -51,7 +52,7 @@ Tick EventStart = ULL(0x7fffffffffffffff); ObjectMatch event_ignore; -#ifdef USE_MYSQL +#if USE_MYSQL class InsertEvent { private: diff --git a/base/stats/events.hh b/base/stats/events.hh index 8b3212bed..2a23240b4 100644 --- a/base/stats/events.hh +++ b/base/stats/events.hh @@ -32,12 +32,13 @@ #include <string> #include "base/trace.hh" +#include "config/use_mysql.hh" namespace Stats { extern Tick EventStart; -#ifdef USE_MYSQL +#if USE_MYSQL void __event(const std::string &stat); bool MySqlConnected(); #endif @@ -52,7 +53,7 @@ recordEvent(const std::string &stat) DPRINTF(StatEvents, "Statistics Event: %s\n", stat); -#ifdef USE_MYSQL +#if USE_MYSQL if (!MySqlConnected()) return; |