Commit 269f9e0d authored by louiz’'s avatar louiz’

Do not fail to build if litesql is not there

parent 1fe2b156
......@@ -12,7 +12,9 @@
#include <atomic>
#include <signal.h>
#include <litesql.hpp>
#ifdef USE_DATABASE
# include <litesql.hpp>
#endif
// A flag set by the SIGINT signal handler.
static std::atomic<bool> stop(false);
......@@ -83,11 +85,14 @@ int main(int ac, char** av)
if (hostname.empty())
return config_help("hostname");
#ifdef USE_DATABASE
try {
open_database();
} catch (const litesql::DatabaseError&) {
return 1;
}
open_database();
} catch (const litesql::DatabaseError&) {
return 1;
}
#endif
// Block the signals we want to manage. They will be unblocked only during
// the epoll_pwait or ppoll calls. This avoids some race conditions,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment