fix: use getaddrinfo() instead of gethostbyname()

This commit is contained in:
Soc Virnyl S. Estela 2022-12-02 21:36:14 +08:00
parent 2111865efe
commit 385726e701
No known key found for this signature in database
GPG Key ID: 66772BC67FC00185

View File

@ -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)");