summaryrefslogtreecommitdiff
blob: 5bf3f982c5d564ca78d95111242cacaec6ef974b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
From 77cf215157d267a7776f3c4ec32e89064dcd84cd Mon Sep 17 00:00:00 2001
From: Andrew Cooper <andrew.cooper3@citrix.com>
Date: Thu, 4 Jul 2024 14:10:29 +0200
Subject: [PATCH 41/56] tools/{c,o}xenstored: Don't link against libsystemd

Use the local freestanding wrapper instead.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Acked-by: Christian Lindig <christian.lindig@cloud.com>
master commit: caf864482689a5dd6a945759b6372bb260d49665
master date: 2024-05-23 15:04:40 +0100
---
 tools/ocaml/xenstored/Makefile        | 3 +--
 tools/ocaml/xenstored/systemd_stubs.c | 2 +-
 tools/xenstored/Makefile              | 5 -----
 tools/xenstored/core.c                | 4 ++--
 4 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/tools/ocaml/xenstored/Makefile b/tools/ocaml/xenstored/Makefile
index e8aaecf2e6..fa45305d8c 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 <systemd/sd-daemon.h>
+#include <xen-sd-notify.h>
 
 CAMLprim value ocaml_sd_notify_ready(value ignore)
 {
diff --git a/tools/xenstored/Makefile b/tools/xenstored/Makefile
index e0897ed1ba..09adfe1d50 100644
--- a/tools/xenstored/Makefile
+++ b/tools/xenstored/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
-
 TARGETS := xenstored
 
 .PHONY: all
diff --git a/tools/xenstored/core.c b/tools/xenstored/core.c
index edd07711db..dfe98e7bfc 100644
--- a/tools/xenstored/core.c
+++ b/tools/xenstored/core.c
@@ -61,7 +61,7 @@
 #endif
 
 #if defined(XEN_SYSTEMD_ENABLED)
-#include <systemd/sd-daemon.h>
+#include <xen-sd-notify.h>
 #endif
 
 extern xenevtchn_handle *xce_handle; /* in domain.c */
@@ -3000,7 +3000,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
 
-- 
2.45.2