tmux/tmux-socket-path.patch

41 lines
1.3 KiB
Diff

--- tmux-3.3/tmux.c 2022-05-14 21:04:35.000000000 +0200
+++ tmux-3.3/tmux.c 2022-06-04 09:08:04.005234096 +0200
@@ -198,16 +198,16 @@
expand_paths(TMUX_SOCK, &paths, &n, 1);
if (n == 0) {
- xasprintf(cause, "no suitable socket path");
- return (NULL);
+ /* SUSE specific hack - remain compatible with previously used socket path */
+ xasprintf(&base, "/run/tmux/%ld", (long)uid);
+ } else {
+ path = paths[0]; /* can only have one socket! */
+ for (i = 1; i < n; i++)
+ free(paths[i]);
+ free(paths);
+ xasprintf(&base, "%s/tmux-%ld", path, (long)uid);
+ free(path);
}
- path = paths[0]; /* can only have one socket! */
- for (i = 1; i < n; i++)
- free(paths[i]);
- free(paths);
-
- xasprintf(&base, "%s/tmux-%ld", path, (long)uid);
- free(path);
if (mkdir(base, S_IRWXU) != 0 && errno != EEXIST) {
xasprintf(cause, "couldn't create directory %s (%s)", base,
strerror(errno));
--- tmux-3.3/tmux.h 2022-05-14 21:04:35.000000000 +0200
+++ tmux-3.3/tmux.h 2022-06-04 09:04:55.829136130 +0200
@@ -74,7 +74,7 @@
#define TMUX_CONF "/etc/tmux.conf:~/.tmux.conf"
#endif
#ifndef TMUX_SOCK
-#define TMUX_SOCK "$TMUX_TMPDIR:" _PATH_TMP
+#define TMUX_SOCK "$TMUX_TMPDIR:"
#endif
#ifndef TMUX_TERM
#define TMUX_TERM "screen"
Nur in b/tmux-3.3: tmux.h.orig.