diff options
author | Jose Bollo <jose.bollo@iot.bzh> | 2019-02-19 09:13:26 +0100 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2019-03-22 12:21:54 +0100 |
commit | ba693048ce1a2b629bfed11fceacabe7edc18a78 (patch) | |
tree | 7cad463bf3186fbe7a70ebf1fcbb740681ff9011 /src/afb-socket.c | |
parent | 8538d642f01c8ee185cb356eba2c2f19cf4cea58 (diff) |
Allow to remove systemd library
This change allows to compile a binder
that doesn't use libsystemd.
The restriction implied is that the neither
the systemd event loop nor the systemd dbus
facilities are availables. Consequently,
the dbus transparancy of APIs isn't available.
Also the work isn't fully complete because
afb-ws-client doesn't handle the removal of
libsystemd.
A more general work still have to be made to
allow the binder to run as library using an
external event loop.
Change-Id: I27a80862868b9c5a0453011a1d8aa3ce75cb5f6e
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afb-socket.c')
-rw-r--r-- | src/afb-socket.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/afb-socket.c b/src/afb-socket.c index cf788de6..754baea0 100644 --- a/src/afb-socket.c +++ b/src/afb-socket.c @@ -32,10 +32,13 @@ #include "afb-fdev.h" #include "afb-socket.h" -#include "systemd.h" #include "fdev.h" #include "verbose.h" +#if WITH_SYSTEMD +#include "systemd.h" +#endif + #define BACKLOG 5 /******************************************************************************/ @@ -225,11 +228,11 @@ static int open_tcp(const char *spec, int server, int reuseaddr) */ static int open_systemd(const char *spec) { -#if defined(NO_SYSTEMD_ACTIVATION) +#if WITH_SYSTEMD + return systemd_fds_for(spec); +#else errno = EAFNOSUPPORT; return -1; -#else - return systemd_fds_for(spec); #endif } |