diff options
author | Tony Crisci <tony@dubstepdish.com> | 2017-12-08 09:22:44 -0500 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2017-12-08 09:22:44 -0500 |
commit | 35188834db182db43b407b58db167950fab05477 (patch) | |
tree | 4ce63cc7f7f01f1e7cf7fb0f6994c4306ae4cad2 /xwayland/sockets.c | |
parent | e3542d879d50d6239ad4ca24b4d30520fef40a87 (diff) | |
parent | 381a646d2fbcb1b488e1551438444ac267f39138 (diff) |
Merge branch 'master' into feature/xwm-selection
Diffstat (limited to 'xwayland/sockets.c')
-rw-r--r-- | xwayland/sockets.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/xwayland/sockets.c b/xwayland/sockets.c index dd732dd7..2119056d 100644 --- a/xwayland/sockets.c +++ b/xwayland/sockets.c @@ -21,6 +21,9 @@ static const char *lock_fmt = "/tmp/.X%d-lock"; static const char *socket_dir = "/tmp/.X11-unix"; static const char *socket_fmt = "/tmp/.X11-unix/X%d"; +#ifndef __linux__ +static const char *socket_fmt2 = "/tmp/.X11-unix/X%d_"; +#endif static int open_socket(struct sockaddr_un *addr, size_t path_size) { int fd, rc; @@ -73,7 +76,7 @@ static bool open_sockets(int socks[2], int display) { addr.sun_path[0] = 0; path_size = snprintf(addr.sun_path + 1, sizeof(addr.sun_path) - 1, socket_fmt, display); #else - path_size = snprintf(addr.sun_path, sizeof(addr.sun_path), socket_fmt, display); + path_size = snprintf(addr.sun_path, sizeof(addr.sun_path), socket_fmt2, display); #endif socks[0] = open_socket(&addr, path_size); if (socks[0] < 0) { @@ -97,6 +100,11 @@ void unlink_display_sockets(int display) { snprintf(sun_path, sizeof(sun_path), socket_fmt, display); unlink(sun_path); +#ifndef __linux__ + snprintf(sun_path, sizeof(sun_path), socket_fmt2, display); + unlink(sun_path); +#endif + snprintf(sun_path, sizeof(sun_path), lock_fmt, display); unlink(sun_path); } |