Description: Do not fail to build if litesql is not there Origin: upstream, https://lab.louiz.org/louiz/biboumi/commit/ad22be4 Author: louiz’ Forwarded: yes Last-Update: 2016-12-21 --- a/src/main.cpp +++ b/src/main.cpp @@ -12,7 +12,9 @@ #include #include -#include +#ifdef USE_DATABASE +# include +#endif // A flag set by the SIGINT signal handler. static std::atomic stop(false); @@ -83,11 +85,14 @@ 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,