xwayland: don't create an abstract unix domain socket on linux (#8874)

This commit is contained in:
Clayton 2024-12-28 09:07:42 -05:00 committed by GitHub
parent 8d4c18d723
commit 2b01a5bcf6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -148,15 +148,8 @@ static bool openSockets(std::array<int, 2>& sockets, int display) {
sockaddr_un addr = {.sun_family = AF_UNIX};
std::string path;
#ifdef __linux__
// cursed...
addr.sun_path[0] = 0;
path = getSocketPath(display, true);
strncpy(addr.sun_path + 1, path.c_str(), path.length() + 1);
#else
path = getSocketPath(display, false);
strncpy(addr.sun_path, path.c_str(), path.length() + 1);
#endif
sockets[0] = createSocket(&addr, path.length());
if (sockets[0] < 0)