aboutsummaryrefslogtreecommitdiff
path: root/sysutils/tmux
diff options
context:
space:
mode:
authorMathieu Arnold <mat@FreeBSD.org>2015-10-14 13:55:06 +0000
committerMathieu Arnold <mat@FreeBSD.org>2015-10-14 13:55:06 +0000
commita11d6f45c60bdedf274827e4d1d9cac6437a7d41 (patch)
tree1fdcceece3bc30366551e08f28be1d540994059e /sysutils/tmux
parent9783336c867e87c2ba837d8d1c4c76e67e9b09f1 (diff)
downloadports-a11d6f45c60bdedf274827e4d1d9cac6437a7d41.tar.gz
ports-a11d6f45c60bdedf274827e4d1d9cac6437a7d41.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
Notes
Notes: svn path=/head/; revision=399264
Diffstat (limited to 'sysutils/tmux')
-rw-r--r--sysutils/tmux/Makefile2
-rw-r--r--sysutils/tmux/files/patch-compat_imsg.c17
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;
++ }
+ }
+ }
+