waybar/0000-replace-gethostbyname-getaddrinfo.patch

28 lines
1.1 KiB
Diff

diff --git a/src/modules/hyprland/backend.cpp b/src/modules/hyprland/backend.cpp
index 76c071c..f110825 100644
--- a/src/modules/hyprland/backend.cpp
+++ b/src/modules/hyprland/backend.cpp
@@ -140,7 +140,7 @@ std::string IPC::getSocket1Reply(const std::string& rq) {
return "";
}
- const auto SERVER = gethostbyname("localhost");
+ const auto SERVER = getaddrinfo("localhost", NULL, NULL, 0);
if (!SERVER) {
spdlog::error("Hyprland IPC: Couldn't get host (2)");
diff --git a/src/modules/sni/tray.cpp b/src/modules/sni/tray.cpp
index 87e5577..09d53e7 100644
--- a/src/modules/sni/tray.cpp
+++ b/src/modules/sni/tray.cpp
@@ -10,9 +10,6 @@ Tray::Tray(const std::string& id, const Bar& bar, const Json::Value& config)
watcher_(SNI::Watcher::getInstance()),
host_(nb_hosts_, config, bar, std::bind(&Tray::onAdd, this, std::placeholders::_1),
std::bind(&Tray::onRemove, this, std::placeholders::_1)) {
- spdlog::warn(
- "For a functional tray you must have libappindicator-* installed and export "
- "XDG_CURRENT_DESKTOP=Unity");
box_.set_name("tray");
event_box_.add(box_);
if (!id.empty()) {