Skip to content

Commit

Permalink
Allowing compiling without DBUS.
Browse files Browse the repository at this point in the history
There is a minor bug in CMakeLists.txt that always brings
in common/dbus.c, even when DBUS is not enabled.
  • Loading branch information
Scott Kilau authored and Scott Kilau committed Feb 16, 2025
1 parent 40c652b commit fc85483
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ add_library(libwsbrd STATIC
common/bus_uart.c
common/capture.c
common/commandline.c
common/dbus.c
common/events_scheduler.c
common/log.c
common/bits.c
Expand Down Expand Up @@ -270,7 +269,7 @@ if(LIBCAP_FOUND)
endif()
if(LIBSYSTEMD_FOUND)
target_compile_definitions(libwsbrd PRIVATE HAVE_LIBSYSTEMD)
target_sources(libwsbrd PRIVATE app_wsbrd/app/dbus.c)
target_sources(libwsbrd PRIVATE common/dbus.c app_wsbrd/app/dbus.c)
if(AUTH_LEGACY)
target_sources(libwsbrd PRIVATE app_wsbrd/app/dbus_auth_legacy.c)
else()
Expand Down
2 changes: 1 addition & 1 deletion app_wsbrd/app/dbus.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ struct wsbr_ctxt;

extern const struct sd_bus_vtable wsbrd_dbus_vtable[];
#else
static const struct sd_bus_vtable *wsbrd_dbus_vtable;
static const struct sd_bus_vtable *wsbrd_dbus_vtable __attribute__ ((unused));
#endif

#endif

0 comments on commit fc85483

Please sign in to comment.