Annotation of pkgsrc/sysutils/lsof/patches/patch-af, revision 1.22

1.22    ! gutterid    1: $NetBSD: patch-af,v 1.21 2020/05/13 19:36:56 tnn Exp $
1.19      manu        2: 
1.22    ! gutterid    3: --- dialects/n+obsd/dlsof.h.orig       2006-03-28 21:54:15.000000000 +0000
        !             4: +++ dialects/n+obsd/dlsof.h
        !             5: @@ -46,6 +46,9 @@
1.20      manu        6:  #include <signal.h>
                      7:  #include <string.h>
                      8:  #include <unistd.h>
1.21      tnn         9: +#if (!defined(NETBSDV) || __NetBSD_Version__>=999001900)
1.20      manu       10: +#include <sys/ptrace.h> /* pulled in by procfs.h, but needs to be pulled in before _KERNEL is defined */
                     11: +#endif
                     12:  
                     13:  # if  defined(HASGETBOOTFILE)
                     14:  #include <util.h>
1.22    ! gutterid   15: @@ -95,6 +98,10 @@ struct uio; /* dummy for function protot
1.14      seb        16:  # endif       /* (defined(OPENBSDV) && OPENBSDV<3030)
                     17:           || (defined(NETBSDV) && __NetBSD_Version__>=106060000) */
                     18:  
                     19: +# if  defined(NETBSDV) && NETBSDV>=1003000
                     20: +#define       sockproto       NETBSD_sockproto
                     21: +# endif       /* defined(NETBSDV) && NETBSDV>=1003000 */
                     22: +
                     23:  #include <sys/mount.h>
                     24:  
                     25:  # if  (defined(OPENBSDV) && OPENBSDV>=3030) \
1.22    ! gutterid   26: @@ -106,10 +113,6 @@ struct uio;       /* dummy for function protot
1.14      seb        27:  #include <rpc/types.h>
                     28:  #include <sys/protosw.h>
                     29:  
                     30: -# if  defined(NETBSDV) && NETBSDV>=1003000
                     31: -#define       sockproto       NETBSD_sockproto
                     32: -# endif       /* defined(NETBSDV) && NETBSDV>=1003000 */
                     33: -
                     34:  #include <sys/socket.h>
                     35:  
                     36:  # if  defined(HASMSDOSFS)
1.22    ! gutterid   37: @@ -147,6 +150,9 @@ struct uio;        /* dummy for function protot
1.16      tnn        38:                   || (defined(NETBSDV) && __NetBSD_Version__<106060000) */
                     39:  
                     40:  #define       _KERNEL
                     41: +#ifndef       VFS_PROTOS
                     42: +#define       VFS_PROTOS(x)
                     43: +#endif
                     44:  struct nameidata;     /* to satisfy a function prototype in msdosfsmount.h */
                     45:  #include <msdosfs/msdosfsmount.h>
                     46:  #undef        _KERNEL
1.22    ! gutterid   47: @@ -161,6 +167,7 @@ struct nameidata;  /* to satisfy a functi
1.7       christos   48:  #include <sys/socketvar.h>
                     49:  #include <sys/un.h>
                     50:  #include <sys/unpcb.h>
                     51: +#include <net/route.h>
                     52:  #include <netinet/in.h>
                     53:  #include <netinet/in_systm.h>
                     54:  #include <netinet/ip.h>
1.22    ! gutterid   55: @@ -170,7 +177,6 @@ struct nameidata;  /* to satisfy a functi
1.7       christos   56:  #include <netinet6/in6_pcb.h>
                     57:  # endif       /* defined(HASIPv6) && defined(NETBSDV) && !defined(HASINRIAIPv6) */
                     58:  
                     59: -#include <net/route.h>
                     60:  #include <netinet/in_pcb.h>
                     61:  #include <netinet/ip_var.h>
                     62:  #include <netinet/tcp.h>
1.22    ! gutterid   63: @@ -264,6 +270,9 @@ struct sockproto {
1.10      veego      64:  
                     65:  #undef KERNEL
                     66:  #include <ufs/mfs/mfsnode.h>
                     67: +# if  defined(HASTMPFS)
                     68: +#include <fs/tmpfs/tmpfs.h>
                     69: +# endif       /* defined(HASTMPFS) */
                     70:  
                     71:  # if  defined(HASNFSPROTO)
                     72:  #include <nfs/rpcv2.h>
1.22    ! gutterid   73: @@ -360,6 +369,16 @@ struct sockproto {
1.19      manu       74:  #  if defined(HASPROCFS_PFSROOT)
                     75:  #define       _KERNEL
                     76:  #  endif      /* defined(HASPROCFS_PFSROOT) */
1.20      manu       77: +#if (defined(NETBSDV) && __NetBSD_Version__>=900000000)
1.19      manu       78: +#include <sys/ptrace.h>
1.20      manu       79: +#endif
1.22    ! gutterid   80: +/* 
        !            81: + * Needed for definition of curlwp, which isn't used by this code base,
        !            82: + * but is exposed in procfs.h in an inline function declaraion.
        !            83: + */
        !            84: +#if (defined(NETBSDV) && __NetBSD_Version__>=999009300)
        !            85: +extern struct lwp     *curlwp;
        !            86: +#endif
1.19      manu       87:  #include <miscfs/procfs/procfs.h>
                     88:  #  if defined(HASPROCFS_PFSROOT)
                     89:  #undef        _KERNEL
1.22    ! gutterid   90: @@ -370,7 +389,6 @@ struct sockproto {
1.15      kamil      91:  #define       Pregs           PFSregs
                     92:  #define       Pfile           PFSfile
                     93:  #define       Pfpregs         PFSfpregs
                     94: -#define       Pctl            PFSctl
                     95:  #define       Pstatus         PFSstatus
                     96:  #define       Pnote           PFSnote
                     97:  #define       Pnotepg         PFSnotepg
1.22    ! gutterid   98: @@ -382,6 +400,9 @@ struct sockproto {
1.15      kamil      99:  #define       Pmap            PFSmap
                    100:  #define       Pmaps           PFSmaps
                    101:  #    endif    /* NETBSDV>=1006000 */
                    102: +#    if       NETBSDV<8099000
                    103: +#define       Pctl            PFSctl
                    104: +#    endif    /* NETBSDV<8099000 */
                    105:  #   endif     /* defined(NetBSDV) */
                    106:  #  endif      /* defined(HASPROCFS_PFSROOT) */
                    107:  #include <machine/reg.h>
1.22    ! gutterid  108: @@ -489,7 +510,12 @@ extern KA_T Kpa;
1.10      veego     109:  struct l_vfs {
                    110:        KA_T addr;                      /* kernel address */
                    111:        fsid_t  fsid;                   /* file system ID */
                    112: +#if defined(NETBSDV) && __NetBSD_Version__ >= 499002500
                    113: +      /* MFSNAMELEN was removed from the kernel source after 4.99.24 */
                    114: +      char type[sizeof(((struct statvfs *)NULL)->f_fstypename)];      /* type of file system */
                    115: +#else
                    116:        char type[MFSNAMELEN];          /* type of file system */
                    117: +#endif
                    118:        char *dir;                      /* mounted directory */
                    119:        char *fsname;                   /* file system name */
                    120:        struct l_vfs *next;             /* forward link */
1.22    ! gutterid  121: @@ -565,7 +591,7 @@ struct sfile {
1.20      manu      122:  #define       NCACHE_NODEADDR nc_vp           /* node address in NCACHE */
                    123:  #define       NCACHE_PARADDR  nc_dvp          /* parent node address in NCACHE */
                    124:  
                    125: -#  if (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1002000)
                    126: +#  if (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1002000 && __NetBSD_Version__ < 999005400)
                    127:  #define       NCACHE_NXT      nc_hash.le_next /* link in NCACHE */
                    128:  #  else       /* (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1002000) */
                    129:  #   if        defined(NetBSD1_0) && NetBSD<1994101
1.22    ! gutterid  130: @@ -581,4 +607,12 @@ struct sfile {
1.11      apb       131:  #  endif      /* defined(HASNCVPID) */
                    132:  # endif  /* defined(HASNCACHE) */
                    133:  
                    134: +#if     defined(VV_ROOT)              /* NetBSD >= 4.99.33 */
                    135: +#define VNODE_VFLAG     v_vflag
                    136: +#define NCACHE_VROOT    VV_ROOT
1.12      apb       137: +#else
                    138: +#define VNODE_VFLAG     v_flag
1.13      tron      139: +#define NCACHE_VROOT    VROOT
1.11      apb       140: +#endif  /* VV_ROOT */
                    141: +
                    142:  #endif        /* NETBSD_LSOF_H */

CVSweb <webmaster@jp.NetBSD.org>