diff options
author | louiz’ <louiz@louiz.org> | 2016-11-25 09:21:27 +0100 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2016-11-25 09:22:24 +0100 |
commit | ad22be41719e29b075d707eb964fee1c4c30cf77 (patch) | |
tree | 7b9a4d12bae728f916350907e2a496c53b54f44b | |
parent | 5cb534c960faed2ed4303cd32f45fa69e4db417e (diff) | |
download | biboumi-ad22be41719e29b075d707eb964fee1c4c30cf77.tar.gz biboumi-ad22be41719e29b075d707eb964fee1c4c30cf77.tar.bz2 biboumi-ad22be41719e29b075d707eb964fee1c4c30cf77.tar.xz biboumi-ad22be41719e29b075d707eb964fee1c4c30cf77.zip |
Do not fail to build if litesql is not there
-rw-r--r-- | src/main.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/main.cpp b/src/main.cpp index 072345f..060372b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -12,7 +12,9 @@ #include <atomic> #include <signal.h> -#include <litesql.hpp> +#ifdef USE_DATABASE +# include <litesql.hpp> +#endif #include <identd/identd_server.hpp> @@ -85,11 +87,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, |