pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/misc/tmux



Module Name:    pkgsrc
Committed By:   leot
Date:           Sat Jun 15 09:42:52 UTC 2019

Modified Files:
        pkgsrc/misc/tmux: Makefile distinfo
Added Files:
        pkgsrc/misc/tmux/patches: patch-osdep-netbsd.c

Log Message:
tmux: Add KERN_PROC_CWD support on NetBSD

If KERN_PROC_CWD is available use it instead of using procfs.

PKGREVISION++


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 pkgsrc/misc/tmux/Makefile
cvs rdiff -u -r1.40 -r1.41 pkgsrc/misc/tmux/distinfo
cvs rdiff -u -r0 -r1.4 pkgsrc/misc/tmux/patches/patch-osdep-netbsd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/misc/tmux/Makefile
diff -u pkgsrc/misc/tmux/Makefile:1.48 pkgsrc/misc/tmux/Makefile:1.49
--- pkgsrc/misc/tmux/Makefile:1.48      Fri May  3 10:49:35 2019
+++ pkgsrc/misc/tmux/Makefile   Sat Jun 15 09:42:52 2019
@@ -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}

Index: pkgsrc/misc/tmux/distinfo
diff -u pkgsrc/misc/tmux/distinfo:1.40 pkgsrc/misc/tmux/distinfo:1.41
--- pkgsrc/misc/tmux/distinfo:1.40      Fri May  3 10:49:35 2019
+++ pkgsrc/misc/tmux/distinfo   Sat Jun 15 09:42:52 2019
@@ -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

Added files:

Index: pkgsrc/misc/tmux/patches/patch-osdep-netbsd.c
diff -u /dev/null pkgsrc/misc/tmux/patches/patch-osdep-netbsd.c:1.4
--- /dev/null   Sat Jun 15 09:42:52 2019
+++ pkgsrc/misc/tmux/patches/patch-osdep-netbsd.c       Sat Jun 15 09:42:52 2019
@@ -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