build: initctl loses AM_CPPFLAGS without D-Bus

initctl_CPPFLAGS is only assigned under the DBUS conditional, but an
automake per-target variable exists even when its conditional is
false, so a --disable-dbus build dropped AM_CPPFLAGS entirely:

    util.c:319:16: error: invalid use of undefined type 'struct FTW'

Assign the base flags unconditionally and append under DBUS.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2026-08-16 22:03:40 +02:00
parent 8f1cd35f1c
commit 480f9c6a9d
+2 -1
View File
@@ -97,11 +97,12 @@ endif
initctl_SOURCES = initctl.c initctl.h cgutil.c cgutil.h \
client.c client.h cond.c cond.h reboot.c \
serv.c serv.h svc.h util.c util.h log.h
initctl_CPPFLAGS = $(AM_CPPFLAGS)
initctl_CFLAGS = -W -Wall -Wextra -Wno-unused-parameter -std=gnu99
initctl_CFLAGS += $(lite_CFLAGS) $(uev_CFLAGS)
initctl_LDADD = $(lite_LIBS) $(uev_LIBS)
if DBUS
initctl_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/libink
initctl_CPPFLAGS += -I$(top_srcdir)/libink
initctl_LDADD += $(top_builddir)/libink/libink.la
endif