From 385726e701257574aa4c64b4b29ec87a9b07816f Mon Sep 17 00:00:00 2001 From: "Soc Virnyl S. Estela" Date: Fri, 2 Dec 2022 21:36:14 +0800 Subject: [PATCH] fix: use getaddrinfo() instead of gethostbyname() --- src/modules/hyprland/backend.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/hyprland/backend.cpp b/src/modules/hyprland/backend.cpp index 76c071c..0c82aba 100644 --- a/src/modules/hyprland/backend.cpp +++ b/src/modules/hyprland/backend.cpp @@ -130,6 +130,8 @@ void IPC::unregisterForIPC(EventHandler* ev_handler) { callbackMutex.unlock(); } + + std::string IPC::getSocket1Reply(const std::string& rq) { // basically hyprctl @@ -140,7 +142,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)");