diff --git a/0000-replace-gethostbyname-getaddrinfo.patch b/0000-replace-gethostbyname-getaddrinfo.patch new file mode 100644 index 0000000..321ad89 --- /dev/null +++ b/0000-replace-gethostbyname-getaddrinfo.patch @@ -0,0 +1,27 @@ +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()) { diff --git a/waybar.changes b/waybar.changes index 7c95c5e..f6a8f25 100644 --- a/waybar.changes +++ b/waybar.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Dec 2 13:52:41 UTC 2022 - Soc Virnyl Estela + +- Add 0000-replace-gethostbyname-getaddrinfo.patch + ------------------------------------------------------------------- Fri Dec 2 07:54:45 UTC 2022 - Soc Virnyl Estela diff --git a/waybar.spec b/waybar.spec index 93a52a9..11f5ba2 100644 --- a/waybar.spec +++ b/waybar.spec @@ -24,6 +24,7 @@ License: MIT Group: System/GUI/Other URL: https://github.com/Alexays/Waybar Source0: %{name}-%{version}.tar.gz +Patch0: 0000-replace-gethostbyname-getaddrinfo.patch # use this to download tarball. then use `meson subprojects download` # to get the `date` dependency. and create own tarball # Source1: https://github.com/Alexays/Waybar/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz @@ -93,7 +94,7 @@ BuildArch: noarch This package provides the upstream look and feel for sway. %prep -%autosetup -n Waybar-%{version} +%autosetup -p1 -n Waybar-%{version} %build %if 0%{?sle_version} >= 150400