Generate a _paths.h for that and add proper dependency.
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: David Scott <dave@recoil.org>
tools/ocaml/libs/xentoollog/xentoollog.ml
tools/ocaml/libs/xentoollog/xentoollog.mli
tools/ocaml/libs/xs/paths.ml
+tools/ocaml/xenstored/_paths.h
tools/ocaml/xenstored/oxenstored
tools/ocaml/xenstored/oxenstored.conf
tools/ocaml/xenstored/paths.ml
systemd_C_OBJS = systemd_stubs
OCAML_LIBRARY += systemd
+$(foreach obj,$(systemd_C_OBJS),$(obj).o): _paths.h
+
LIBS_systemd += $(LDFLAGS-y)
OBJS = paths \
$(eval $(genpath-target))
GENERATED_FILES += paths.ml
+
+genpath-target = $(call buildmakevars2header,_paths.h)
+$(eval $(genpath-target))
+
+GENERATE_FILES += _paths.h
#include <sys/socket.h>
#include <systemd/sd-daemon.h>
+#include "_paths.h"
+
/* Will work regardless of the order systemd gives them to us */
static int oxen_get_sd_fd(const char *connect_to)
{
static int oxen_verify_socket_socket(const char *connect_to)
{
- if ((strcmp("/var/run/xenstored/socket_ro", connect_to) != 0) &&
- (strcmp("/var/run/xenstored/socket", connect_to) != 0)) {
+ if ((strcmp(XEN_RUN_STORED "/socket_ro", connect_to) != 0) &&
+ (strcmp(XEN_RUN_STORED "/socket", connect_to) != 0)) {
sd_notifyf(0, "STATUS=unexpected socket: %s\n"
"ERRNO=%i",
connect_to,