pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/sysutils/lsof/patches Make lsof build on NetBSD >= 4.9...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/66eb45a9f098
branches:  trunk
changeset: 535527:66eb45a9f098
user:      apb <apb%pkgsrc.org@localhost>
date:      Wed Nov 21 11:01:55 2007 +0000

description:
Make lsof build on NetBSD >= 4.99.33.

diffstat:

 sysutils/lsof/patches/patch-ad |  38 ++++++++++++++++++++++++++++----------
 sysutils/lsof/patches/patch-af |  22 ++++++++++++++++------
 2 files changed, 44 insertions(+), 16 deletions(-)

diffs (152 lines):

diff -r fafe1386fde6 -r 66eb45a9f098 sysutils/lsof/patches/patch-ad
--- a/sysutils/lsof/patches/patch-ad    Wed Nov 21 07:50:14 2007 +0000
+++ b/sysutils/lsof/patches/patch-ad    Wed Nov 21 11:01:55 2007 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-ad,v 1.13 2007/08/14 19:59:18 veego Exp $
+$NetBSD: patch-ad,v 1.14 2007/11/21 11:01:55 apb Exp $
 
 --- dialects/n+obsd/dnode.c.orig       2007-04-24 18:22:06.000000000 +0200
-+++ dialects/n+obsd/dnode.c    2007-08-11 19:46:43.000000000 +0200
-@@ -38,6 +38,9 @@
++++ dialects/n+obsd/dnode.c
+@@ -38,6 +38,9 @@ static char *rcsid = "$Id: dnode.c,v 1.3
  
  #include "lsof.h"
  
@@ -12,7 +12,7 @@
  
  #if   defined(HAS_DINODE_U)
  #define       DINODE_U        dinode_u
-@@ -194,12 +197,17 @@
+@@ -194,12 +197,17 @@ process_node(va)
        unsigned char ns;
        unsigned char rdevs;
        char *ep, *ty;
@@ -31,7 +31,25 @@
        enum vtype type;
        struct vnode *v, vb;
        struct l_vfs *vfs;
-@@ -471,6 +479,19 @@
+@@ -414,7 +422,7 @@ process_overlaid_node:
+        */
+           if (!v->v_data
+           ||  kread((KA_T)v->v_data, (char *)&kn, sizeof(kn))) {
+-              if (v->v_type != VDIR || !(v->v_flag && VROOT)) {
++              if (v->v_type != VDIR || !(v->VNODE_VFLAG && NCACHE_VROOT)) {
+                   (void) snpf(Namech, Namechl,
+                       "can't read kernfs_node at: %s",
+                       print_kptr((KA_T)v->v_data, (char *)NULL, 0));
+@@ -449,7 +457,7 @@ process_overlaid_node:
+        * size are fixed; otherwise, safely stat() the file to get the
+        * inode number and size.
+        */
+-          if (v->v_type == VDIR && (v->v_flag & VROOT)) {
++          if (v->v_type == VDIR && (v->VNODE_VFLAG & NCACHE_VROOT)) {
+               (void) snpf(Namech, Namechl, "%s", _PATH_KERNFS);
+               ksb.st_ino = (ino_t)2;
+               ksb.st_size = DEV_BSIZE;
+@@ -471,6 +479,19 @@ process_overlaid_node:
            nty = MFSNODE;
            break;
  
@@ -51,7 +69,7 @@
  #if   defined(HASMSDOSFS)
        case VT_MSDOSFS:
            if (!v->v_data
-@@ -619,6 +640,7 @@
+@@ -619,6 +640,7 @@ process_overlaid_node:
  
            }
  
@@ -59,7 +77,7 @@
            if ((lff = i.i_lockf)) {
  
            /*
-@@ -667,6 +689,7 @@
+@@ -667,6 +689,7 @@ process_overlaid_node:
                    break;
                } while ((lfp = lf.lf_next) && lfp != lff);
            }
@@ -67,7 +85,7 @@
            break;
        default:
            if (v->v_type == VBAD || v->v_type == VNON)
-@@ -900,6 +923,13 @@
+@@ -900,6 +923,13 @@ process_overlaid_node:
            break;
  #endif        /* defined(HASPTYFS) */
  
@@ -81,7 +99,7 @@
        }
  
  /*
-@@ -1019,6 +1049,13 @@
+@@ -1019,6 +1049,13 @@ process_overlaid_node:
                        Lf->sz_def = 1;
                        break;
  
@@ -95,7 +113,7 @@
  #if   defined(HASEXT2FS)
                    case EXT2NODE:
  # if  defined(HASI_E2FS_PTR)
-@@ -1221,6 +1258,9 @@
+@@ -1221,6 +1258,9 @@ process_overlaid_node:
            Lf->dev_def = Lf->rdev_def = 0;
            (void) snpf(Namech, Namechl, "%#x", m.mfs_baseoff);
            enter_dev_ch("memory");
diff -r fafe1386fde6 -r 66eb45a9f098 sysutils/lsof/patches/patch-af
--- a/sysutils/lsof/patches/patch-af    Wed Nov 21 07:50:14 2007 +0000
+++ b/sysutils/lsof/patches/patch-af    Wed Nov 21 11:01:55 2007 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-af,v 1.10 2007/08/14 19:59:18 veego Exp $
+$NetBSD: patch-af,v 1.11 2007/11/21 11:01:55 apb Exp $
 
 --- dialects/n+obsd/dlsof.h.orig       2006-03-28 23:54:15.000000000 +0200
-+++ dialects/n+obsd/dlsof.h    2007-08-11 18:16:59.000000000 +0200
-@@ -161,6 +161,7 @@
++++ dialects/n+obsd/dlsof.h
+@@ -161,6 +161,7 @@ struct nameidata;  /* to satisfy a functi
  #include <sys/socketvar.h>
  #include <sys/un.h>
  #include <sys/unpcb.h>
@@ -10,7 +10,7 @@
  #include <netinet/in.h>
  #include <netinet/in_systm.h>
  #include <netinet/ip.h>
-@@ -170,7 +171,6 @@
+@@ -170,7 +171,6 @@ struct nameidata;  /* to satisfy a functi
  #include <netinet6/in6_pcb.h>
  # endif       /* defined(HASIPv6) && defined(NETBSDV) && !defined(HASINRIAIPv6) */
  
@@ -18,7 +18,7 @@
  #include <netinet/in_pcb.h>
  #include <netinet/ip_var.h>
  #include <netinet/tcp.h>
-@@ -264,6 +264,9 @@
+@@ -264,6 +264,9 @@ struct sockproto {
  
  #undef KERNEL
  #include <ufs/mfs/mfsnode.h>
@@ -28,7 +28,7 @@
  
  # if  defined(HASNFSPROTO)
  #include <nfs/rpcv2.h>
-@@ -489,7 +492,12 @@
+@@ -489,7 +492,12 @@ extern KA_T Kpa;
  struct l_vfs {
        KA_T addr;                      /* kernel address */
        fsid_t  fsid;                   /* file system ID */
@@ -41,3 +41,13 @@
        char *dir;                      /* mounted directory */
        char *fsname;                   /* file system name */
        struct l_vfs *next;             /* forward link */
+@@ -581,4 +589,9 @@ struct sfile {
+ #  endif      /* defined(HASNCVPID) */
+ # endif  /* defined(HASNCACHE) */
+ 
++#if     defined(VV_ROOT)              /* NetBSD >= 4.99.33 */
++#define VNODE_VFLAG     v_vflag
++#define NCACHE_VROOT    VV_ROOT
++#endif  /* VV_ROOT */
++
+ #endif        /* NETBSD_LSOF_H */



Home | Main Index | Thread Index | Old Index