aboutsummaryrefslogtreecommitdiffstats
path: root/core/dbus_wrap.cpp
diff options
context:
space:
mode:
authorSven Göthel <[email protected]>2024-01-05 13:52:12 +0100
committerSven Göthel <[email protected]>2024-01-05 13:52:12 +0100
commitec98cdacc85ff0202852472c7756586437912f22 (patch)
tree42414746a27ab35cb8cdbc95af521d74821e57f4 /core/dbus_wrap.cpp
parentfd5269bec9a5fe4815974b1786a037e6a247bfd2 (diff)
parentb82cd2e60edb8fbe5fdd3567105ae76a016a554c (diff)
Merge remote-tracking branch 'upstream/master'HEADmaster
Diffstat (limited to 'core/dbus_wrap.cpp')
-rw-r--r--core/dbus_wrap.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/core/dbus_wrap.cpp b/core/dbus_wrap.cpp
index 48419566..05d9fc06 100644
--- a/core/dbus_wrap.cpp
+++ b/core/dbus_wrap.cpp
@@ -8,16 +8,22 @@
#include <mutex>
#include <type_traits>
-#include "albit.h"
#include "logging.h"
void PrepareDBus()
{
- static constexpr char libname[] = "libdbus-1.so.3";
+ const char *libname{"libdbus-1.so.3"};
+
+ dbus_handle = LoadLib(libname);
+ if(!dbus_handle)
+ {
+ WARN("Failed to load %s\n", libname);
+ return;
+ }
auto load_func = [](auto &f, const char *name) -> void
- { f = al::bit_cast<std::remove_reference_t<decltype(f)>>(GetSymbol(dbus_handle, name)); };
+ { f = reinterpret_cast<std::remove_reference_t<decltype(f)>>(GetSymbol(dbus_handle, name)); };
#define LOAD_FUNC(x) do { \
load_func(p##x, #x); \
if(!p##x) \
@@ -29,14 +35,8 @@ void PrepareDBus()
} \
} while(0);
- dbus_handle = LoadLib(libname);
- if(!dbus_handle)
- {
- WARN("Failed to load %s\n", libname);
- return;
- }
+ DBUS_FUNCTIONS(LOAD_FUNC)
-DBUS_FUNCTIONS(LOAD_FUNC)
#undef LOAD_FUNC
}
#endif