From: Andrew Cooper Date: Thu, 4 Jul 2024 12:19:25 +0000 (+0200) Subject: tools/{c,o}xenstored: Don't link against libsystemd X-Git-Tag: RELEASE-4.17.5~26 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=cf0342d86f56faff64e0701833049ed457c0721e;p=xen.git tools/{c,o}xenstored: Don't link against libsystemd Use the local freestanding wrapper instead. Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Acked-by: Christian Lindig master commit: caf864482689a5dd6a945759b6372bb260d49665 master date: 2024-05-23 15:04:40 +0100 --- diff --git a/tools/ocaml/xenstored/Makefile b/tools/ocaml/xenstored/Makefile index 6f7333926e..48b47448f2 100644 --- a/tools/ocaml/xenstored/Makefile +++ b/tools/ocaml/xenstored/Makefile @@ -4,8 +4,7 @@ include $(OCAML_TOPLEVEL)/common.make # Include configure output (config.h) CFLAGS += -include $(XEN_ROOT)/tools/config.h -CFLAGS-$(CONFIG_SYSTEMD) += $(SYSTEMD_CFLAGS) -LDFLAGS-$(CONFIG_SYSTEMD) += $(SYSTEMD_LIBS) +CFLAGS-$(CONFIG_SYSTEMD) += $(CFLAGS_xeninclude) CFLAGS += $(CFLAGS-y) CFLAGS += $(APPEND_CFLAGS) diff --git a/tools/ocaml/xenstored/systemd_stubs.c b/tools/ocaml/xenstored/systemd_stubs.c index f4c875075a..7dbbdd35bf 100644 --- a/tools/ocaml/xenstored/systemd_stubs.c +++ b/tools/ocaml/xenstored/systemd_stubs.c @@ -25,7 +25,7 @@ #if defined(HAVE_SYSTEMD) -#include +#include CAMLprim value ocaml_sd_notify_ready(value ignore) { diff --git a/tools/xenstore/Makefile b/tools/xenstore/Makefile index ce7a68178f..f41d04304f 100644 --- a/tools/xenstore/Makefile +++ b/tools/xenstore/Makefile @@ -9,11 +9,6 @@ xenstored: LDLIBS += $(LDLIBS_libxenctrl) xenstored: LDLIBS += -lrt xenstored: LDLIBS += $(SOCKET_LIBS) -ifeq ($(CONFIG_SYSTEMD),y) -$(XENSTORED_OBJS-y): CFLAGS += $(SYSTEMD_CFLAGS) -xenstored: LDLIBS += $(SYSTEMD_LIBS) -endif - xenstore: LDLIBS += $(LDLIBS_libxenstore) xenstore: LDLIBS += $(LDLIBS_libxentoolcore) xenstore: LDLIBS += $(SOCKET_LIBS) diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_core.c index 09b5d0656f..3b3a9f563a 100644 --- a/tools/xenstore/xenstored_core.c +++ b/tools/xenstore/xenstored_core.c @@ -61,7 +61,7 @@ #endif #if defined(XEN_SYSTEMD_ENABLED) -#include +#include #endif extern xenevtchn_handle *xce_handle; /* in xenstored_domain.c */ @@ -2888,7 +2888,7 @@ int main(int argc, char *argv[]) #if defined(XEN_SYSTEMD_ENABLED) if (!live_update) { sd_notify(1, "READY=1"); - fprintf(stderr, SD_NOTICE "xenstored is ready\n"); + fprintf(stderr, "xenstored is ready\n"); } #endif