diff options
author | mat <mat@FreeBSD.org> | 2015-10-14 21:55:06 +0800 |
---|---|---|
committer | mat <mat@FreeBSD.org> | 2015-10-14 21:55:06 +0800 |
commit | 94e3c46ad8094b86cb7aa09ab5dfef655a9d5adc (patch) | |
tree | 1fdcceece3bc30366551e08f28be1d540994059e | |
parent | 0deabe942e73e44a243e8b564eb6b5a1a6f6671b (diff) | |
download | freebsd-ports-gnome-94e3c46ad8094b86cb7aa09ab5dfef655a9d5adc.tar.gz freebsd-ports-gnome-94e3c46ad8094b86cb7aa09ab5dfef655a9d5adc.tar.zst freebsd-ports-gnome-94e3c46ad8094b86cb7aa09ab5dfef655a9d5adc.zip |
Fix tmux not starting on an IPv6 only system.
Note that tmux will still not work if you have neither v4 nor v6.
PR: 203720
Obtained from: https://github.com/tmux/tmux/issues/139
Sponsored by: Absolight
-rw-r--r-- | sysutils/tmux/Makefile | 2 | ||||
-rw-r--r-- | sysutils/tmux/files/patch-compat_imsg.c | 17 |
2 files changed, 18 insertions, 1 deletions
diff --git a/sysutils/tmux/Makefile b/sysutils/tmux/Makefile index 604b15ca3701..0bf70adb6cbf 100644 --- a/sysutils/tmux/Makefile +++ b/sysutils/tmux/Makefile @@ -3,7 +3,7 @@ PORTNAME= tmux PORTVERSION= 2.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= sysutils MASTER_SITES= https://github.com/tmux/tmux/releases/download/${PORTVERSION}/ \ SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION:S/a$//} diff --git a/sysutils/tmux/files/patch-compat_imsg.c b/sysutils/tmux/files/patch-compat_imsg.c new file mode 100644 index 000000000000..a0203c44fa4e --- /dev/null +++ b/sysutils/tmux/files/patch-compat_imsg.c @@ -0,0 +1,17 @@ +--- compat/imsg.c.orig 2015-10-14 13:20:40 UTC ++++ compat/imsg.c +@@ -54,8 +54,12 @@ available_fds(unsigned int n) + for (i = 0; i < n; i++) { + fds[i] = -1; + if ((fds[i] = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { +- ret = 1; +- break; ++ if (errno == EAFNOSUPPORT || errno == EPROTONOSUPPORT) ++ fds[i] = socket(AF_INET6, SOCK_DGRAM, 0); ++ if (fds[i] < 0) { ++ ret = 1; ++ break; ++ } + } + } + |