Skip to content

Commit 4c377b8

Browse files
Scott KilauMathisMARION
authored andcommitted
build: allowing compiling without D-Bus
There is a minor bug in CMakeLists.txt that always brings in common/dbus.c, even when DBUS is not enabled. Origin: #24
1 parent fa22848 commit 4c377b8

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ add_library(libwsbrd STATIC
146146
common/bus_uart.c
147147
common/capture.c
148148
common/commandline.c
149-
common/dbus.c
150149
common/events_scheduler.c
151150
common/log.c
152151
common/bits.c
@@ -271,7 +270,7 @@ if(LIBCAP_FOUND)
271270
endif()
272271
if(LIBSYSTEMD_FOUND)
273272
target_compile_definitions(libwsbrd PRIVATE HAVE_LIBSYSTEMD)
274-
target_sources(libwsbrd PRIVATE app_wsbrd/app/dbus.c)
273+
target_sources(libwsbrd PRIVATE common/dbus.c app_wsbrd/app/dbus.c)
275274
if(AUTH_LEGACY)
276275
target_sources(libwsbrd PRIVATE app_wsbrd/app/dbus_auth_legacy.c)
277276
else()

app_wsbrd/app/dbus.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ struct wsbr_ctxt;
2121

2222
extern const struct sd_bus_vtable wsbrd_dbus_vtable[];
2323
#else
24-
static const struct sd_bus_vtable *wsbrd_dbus_vtable;
24+
static const struct sd_bus_vtable *const wsbrd_dbus_vtable;
2525
#endif
2626

2727
#endif

0 commit comments

Comments
 (0)