diff --git a/cf-serverd/Makefile.am b/cf-serverd/Makefile.am index 0b60c53891..999ba930b3 100644 --- a/cf-serverd/Makefile.am +++ b/cf-serverd/Makefile.am @@ -36,6 +36,8 @@ AM_CFLAGS = \ $(PTHREAD_CFLAGS) \ $(ENTERPRISE_CFLAGS) +LIBS += $(SYSTEMD_SOCKET_LIBS) + libcf_serverd_la_LIBADD = ../libpromises/libpromises.la libcf_serverd_la_SOURCES = \ diff --git a/tests/unit/Makefile.am b/tests/unit/Makefile.am index 1cde4a8878..a0a43e95b5 100644 --- a/tests/unit/Makefile.am +++ b/tests/unit/Makefile.am @@ -46,6 +46,8 @@ LDADD = ../../libpromises/libpromises.la libtest.la # implementation, then we are pretty sure that they will be overriden by # our local implementation. So we include *everything*... LIBS = $(CORE_LIBS) +# protocol_test relies on cf-serverd-functions which can rely on libsystemd so need SYSTEMD_SOCKET_LIBS here +LIBS += $(SYSTEMD_SOCKET_LIBS) AM_LDFLAGS = $(CORE_LDFLAGS) AM_CFLAGS = $(PTHREAD_CFLAGS) @@ -240,6 +242,7 @@ protocol_test_SOURCES = protocol_test.c \ ../../cf-serverd/server_access.c \ ../../cf-serverd/strlist.c protocol_test_LDADD = ../../libpromises/libpromises.la libtest.la +protocol_test_LDFLAGS = -lsystemd if HAVE_AVAHI_CLIENT if HAVE_AVAHI_COMMON