Do not fail to build if litesql is not there
This commit is contained in:
+10
-5
@@ -12,7 +12,9 @@
|
|||||||
|
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <litesql.hpp>
|
#ifdef USE_DATABASE
|
||||||
|
# include <litesql.hpp>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <identd/identd_server.hpp>
|
#include <identd/identd_server.hpp>
|
||||||
|
|
||||||
@@ -85,11 +87,14 @@ int main(int ac, char** av)
|
|||||||
if (hostname.empty())
|
if (hostname.empty())
|
||||||
return config_help("hostname");
|
return config_help("hostname");
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef USE_DATABASE
|
||||||
try {
|
try {
|
||||||
open_database();
|
open_database();
|
||||||
} catch (const litesql::DatabaseError&) {
|
} catch (const litesql::DatabaseError&) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Block the signals we want to manage. They will be unblocked only during
|
// Block the signals we want to manage. They will be unblocked only during
|
||||||
// the epoll_pwait or ppoll calls. This avoids some race conditions,
|
// the epoll_pwait or ppoll calls. This avoids some race conditions,
|
||||||
|
|||||||
Reference in New Issue
Block a user