16 const char *libname
{"libdbus-1.so.3"};
18 dbus_handle
= LoadLib(libname
);
21 WARN("Failed to load %s\n", libname
);
25 auto load_func
= [](auto &f
, const char *name
) -> void
26 { f
= reinterpret_cast<std::remove_reference_t
<decltype(f
)>>(GetSymbol(dbus_handle
, name
)); };
27 #define LOAD_FUNC(x) do { \
28 load_func(p##x, #x); \
31 WARN("Failed to load function %s\n", #x); \
32 CloseLib(dbus_handle); \
33 dbus_handle = nullptr; \
38 DBUS_FUNCTIONS(LOAD_FUNC
)