Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Thaodan:X11:Wayland
waybar
0000-replace-gethostbyname-getaddrinfo.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0000-replace-gethostbyname-getaddrinfo.patch of Package waybar
diff --git a/src/modules/hyprland/backend.cpp b/src/modules/hyprland/backend.cpp index 76c071c..33212c7 100644 --- a/src/modules/hyprland/backend.cpp +++ b/src/modules/hyprland/backend.cpp @@ -132,15 +132,20 @@ void IPC::unregisterForIPC(EventHandler* ev_handler) { std::string IPC::getSocket1Reply(const std::string& rq) { // basically hyprctl - + + struct addrinfo ai_hints; + struct addrinfo *ai_res = NULL; const auto SERVERSOCKET = socket(AF_UNIX, SOCK_STREAM, 0); if (SERVERSOCKET < 0) { spdlog::error("Hyprland IPC: Couldn't open a socket (1)"); return ""; } - - const auto SERVER = gethostbyname("localhost"); + + memset(&ai_hints, 0, sizeof(struct addrinfo)); + ai_hints.ai_family = AF_UNSPEC; + ai_hints.ai_socktype = SOCK_STREAM; + const auto SERVER = getaddrinfo("localhost", NULL, &ai_hints, &ai_res); if (!SERVER) { spdlog::error("Hyprland IPC: Couldn't get host (2)");
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor