Also specifically try loading libdbus-1.so.3

This commit is contained in:
Robbert van der Helm
2022-10-28 20:44:47 +02:00
parent c36627f4c2
commit 31e76f416c
+4
View File
@@ -29,6 +29,7 @@
#include "utils.h" #include "utils.h"
constexpr char libdbus_library_name[] = "libdbus-1.so"; constexpr char libdbus_library_name[] = "libdbus-1.so";
constexpr char libdbus_library_fallback_name[] = "libdbus-1.so.3";
std::atomic<void*> libdbus_handle = nullptr; std::atomic<void*> libdbus_handle = nullptr;
std::mutex libdbus_mutex; std::mutex libdbus_mutex;
@@ -75,11 +76,14 @@ bool setup_libdbus() {
Logger logger = Logger::create_exception_logger(); Logger logger = Logger::create_exception_logger();
void* handle = dlopen(libdbus_library_name, RTLD_LAZY | RTLD_LOCAL); void* handle = dlopen(libdbus_library_name, RTLD_LAZY | RTLD_LOCAL);
if (!handle) {
handle = dlopen(libdbus_library_fallback_name, RTLD_LAZY | RTLD_LOCAL);
if (!handle) { if (!handle) {
logger.log("Could not load '" + std::string(libdbus_library_name) + logger.log("Could not load '" + std::string(libdbus_library_name) +
"', not sending desktop notifications"); "', not sending desktop notifications");
return false; return false;
} }
}
#define X(name) \ #define X(name) \
do { \ do { \