pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/misc/tmux tmux: Add KERN_PROC_CWD support on NetBSD
details: https://anonhg.NetBSD.org/pkgsrc/rev/45818ddaf911
branches: trunk
changeset: 335211:45818ddaf911
user: leot <leot%pkgsrc.org@localhost>
date: Sat Jun 15 09:42:52 2019 +0000
description:
tmux: Add KERN_PROC_CWD support on NetBSD
If KERN_PROC_CWD is available use it instead of using procfs.
PKGREVISION++
diffstat:
misc/tmux/Makefile | 3 +-
misc/tmux/distinfo | 3 +-
misc/tmux/patches/patch-osdep-netbsd.c | 40 ++++++++++++++++++++++++++++++++++
3 files changed, 44 insertions(+), 2 deletions(-)
diffs (68 lines):
diff -r 0e1d926c9184 -r 45818ddaf911 misc/tmux/Makefile
--- a/misc/tmux/Makefile Sat Jun 15 09:39:53 2019 +0000
+++ b/misc/tmux/Makefile Sat Jun 15 09:42:52 2019 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.48 2019/05/03 10:49:35 triaxx Exp $
+# $NetBSD: Makefile,v 1.49 2019/06/15 09:42:52 leot Exp $
DISTNAME= tmux-2.9a
+PKGREVISION= 1
CATEGORIES= misc
MASTER_SITES= ${MASTER_SITE_GITHUB:=tmux/}
GITHUB_RELEASE= ${PKGVERSION_NOREV}
diff -r 0e1d926c9184 -r 45818ddaf911 misc/tmux/distinfo
--- a/misc/tmux/distinfo Sat Jun 15 09:39:53 2019 +0000
+++ b/misc/tmux/distinfo Sat Jun 15 09:42:52 2019 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.40 2019/05/03 10:49:35 triaxx Exp $
+$NetBSD: distinfo,v 1.41 2019/06/15 09:42:52 leot Exp $
SHA1 (tmux-2.9a.tar.gz) = 33cba73e64c62f46bd244d4472c59371fb747f56
RMD160 (tmux-2.9a.tar.gz) = e5460971073abb865adcea2a6711e82d84c53838
SHA512 (tmux-2.9a.tar.gz) = aca6882688727c10c5647443fdd18bbd6c0f80b7a3bf9667903d1b89d523e604cd715f176f33f2e5673258f00e626a6dc273f80fe97ae4f91621814d89985713
Size (tmux-2.9a.tar.gz) = 510915 bytes
+SHA1 (patch-osdep-netbsd.c) = 90d335b544dbacc3860cfa6c13ecd61b11f09f30
diff -r 0e1d926c9184 -r 45818ddaf911 misc/tmux/patches/patch-osdep-netbsd.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/tmux/patches/patch-osdep-netbsd.c Sat Jun 15 09:42:52 2019 +0000
@@ -0,0 +1,40 @@
+$NetBSD: patch-osdep-netbsd.c,v 1.4 2019/06/15 09:42:52 leot Exp $
+
+Add support for KERN_PROC_CWD.
+
+--- osdep-netbsd.c.orig 2019-03-26 14:34:58.000000000 +0000
++++ osdep-netbsd.c
+@@ -135,11 +135,24 @@ osdep_get_cwd(int fd)
+ static char target[PATH_MAX + 1];
+ char *path;
+ pid_t pgrp;
+- ssize_t n;
+
+ if ((pgrp = tcgetpgrp(fd)) == -1)
+ return (NULL);
+
++#ifdef KERN_PROC_CWD
++ int mib[4];
++ size_t len;
++
++ mib[0] = CTL_KERN;
++ mib[1] = KERN_PROC_ARGS;
++ mib[2] = pgrp;
++ mib[3] = KERN_PROC_CWD;
++ len = sizeof(target);
++ if (sysctl(mib, 4, target, &len, NULL, 0) == 0)
++ return (target);
++#else
++ ssize_t n;
++
+ xasprintf(&path, "/proc/%lld/cwd", (long long) pgrp);
+ n = readlink(path, target, sizeof(target) - 1);
+ free(path);
+@@ -147,6 +160,7 @@ osdep_get_cwd(int fd)
+ target[n] = '\0';
+ return (target);
+ }
++#endif
+
+ return (NULL);
+ }
Home |
Main Index |
Thread Index |
Old Index