head 1.25; access; symbols pkgsrc-2026Q1:1.25.0.8 pkgsrc-2026Q1-base:1.25 pkgsrc-2025Q4:1.25.0.6 pkgsrc-2025Q4-base:1.25 pkgsrc-2025Q3:1.25.0.4 pkgsrc-2025Q3-base:1.25 pkgsrc-2025Q2:1.25.0.2 pkgsrc-2025Q2-base:1.25 pkgsrc-2025Q1:1.23.0.26 pkgsrc-2025Q1-base:1.23 pkgsrc-2024Q4:1.23.0.24 pkgsrc-2024Q4-base:1.23 pkgsrc-2024Q3:1.23.0.22 pkgsrc-2024Q3-base:1.23 pkgsrc-2024Q2:1.23.0.20 pkgsrc-2024Q2-base:1.23 pkgsrc-2024Q1:1.23.0.18 pkgsrc-2024Q1-base:1.23 pkgsrc-2023Q4:1.23.0.16 pkgsrc-2023Q4-base:1.23 pkgsrc-2023Q3:1.23.0.14 pkgsrc-2023Q3-base:1.23 pkgsrc-2023Q2:1.23.0.12 pkgsrc-2023Q2-base:1.23 pkgsrc-2023Q1:1.23.0.10 pkgsrc-2023Q1-base:1.23 pkgsrc-2022Q4:1.23.0.8 pkgsrc-2022Q4-base:1.23 pkgsrc-2022Q3:1.23.0.6 pkgsrc-2022Q3-base:1.23 pkgsrc-2022Q2:1.23.0.4 pkgsrc-2022Q2-base:1.23 pkgsrc-2022Q1:1.23.0.2 pkgsrc-2022Q1-base:1.23 pkgsrc-2021Q4:1.21.0.14 pkgsrc-2021Q4-base:1.21 pkgsrc-2021Q3:1.21.0.12 pkgsrc-2021Q3-base:1.21 pkgsrc-2021Q2:1.21.0.10 pkgsrc-2021Q2-base:1.21 pkgsrc-2021Q1:1.21.0.8 pkgsrc-2021Q1-base:1.21 pkgsrc-2020Q4:1.21.0.6 pkgsrc-2020Q4-base:1.21 pkgsrc-2020Q3:1.21.0.4 pkgsrc-2020Q3-base:1.21 pkgsrc-2020Q2:1.21.0.2 pkgsrc-2020Q2-base:1.21 pkgsrc-2020Q1:1.17.0.2 pkgsrc-2020Q1-base:1.17 pkgsrc-2019Q4:1.16.0.10 pkgsrc-2019Q4-base:1.16 pkgsrc-2019Q3:1.16.0.6 pkgsrc-2019Q3-base:1.16 pkgsrc-2019Q2:1.16.0.4 pkgsrc-2019Q2-base:1.16 pkgsrc-2019Q1:1.16.0.2 pkgsrc-2019Q1-base:1.16 pkgsrc-2018Q4:1.15.0.14 pkgsrc-2018Q4-base:1.15 pkgsrc-2018Q3:1.15.0.12 pkgsrc-2018Q3-base:1.15 pkgsrc-2018Q2:1.15.0.10 pkgsrc-2018Q2-base:1.15 pkgsrc-2018Q1:1.15.0.8 pkgsrc-2018Q1-base:1.15 pkgsrc-2017Q4:1.15.0.6 pkgsrc-2017Q4-base:1.15 pkgsrc-2017Q3:1.15.0.4 pkgsrc-2017Q3-base:1.15 pkgsrc-2017Q2:1.14.0.66 pkgsrc-2017Q2-base:1.14 pkgsrc-2017Q1:1.14.0.64 pkgsrc-2017Q1-base:1.14 pkgsrc-2016Q4:1.14.0.62 pkgsrc-2016Q4-base:1.14 pkgsrc-2016Q3:1.14.0.60 pkgsrc-2016Q3-base:1.14 pkgsrc-2016Q2:1.14.0.58 pkgsrc-2016Q2-base:1.14 pkgsrc-2016Q1:1.14.0.56 pkgsrc-2016Q1-base:1.14 pkgsrc-2015Q4:1.14.0.54 pkgsrc-2015Q4-base:1.14 pkgsrc-2015Q3:1.14.0.52 pkgsrc-2015Q3-base:1.14 pkgsrc-2015Q2:1.14.0.50 pkgsrc-2015Q2-base:1.14 pkgsrc-2015Q1:1.14.0.48 pkgsrc-2015Q1-base:1.14 pkgsrc-2014Q4:1.14.0.46 pkgsrc-2014Q4-base:1.14 pkgsrc-2014Q3:1.14.0.44 pkgsrc-2014Q3-base:1.14 pkgsrc-2014Q2:1.14.0.42 pkgsrc-2014Q2-base:1.14 pkgsrc-2014Q1:1.14.0.40 pkgsrc-2014Q1-base:1.14 pkgsrc-2013Q4:1.14.0.38 pkgsrc-2013Q4-base:1.14 pkgsrc-2013Q3:1.14.0.36 pkgsrc-2013Q3-base:1.14 pkgsrc-2013Q2:1.14.0.34 pkgsrc-2013Q2-base:1.14 pkgsrc-2013Q1:1.14.0.32 pkgsrc-2013Q1-base:1.14 pkgsrc-2012Q4:1.14.0.30 pkgsrc-2012Q4-base:1.14 pkgsrc-2012Q3:1.14.0.28 pkgsrc-2012Q3-base:1.14 pkgsrc-2012Q2:1.14.0.26 pkgsrc-2012Q2-base:1.14 pkgsrc-2012Q1:1.14.0.24 pkgsrc-2012Q1-base:1.14 pkgsrc-2011Q4:1.14.0.22 pkgsrc-2011Q4-base:1.14 pkgsrc-2011Q3:1.14.0.20 pkgsrc-2011Q3-base:1.14 pkgsrc-2011Q2:1.14.0.18 pkgsrc-2011Q2-base:1.14 pkgsrc-2011Q1:1.14.0.16 pkgsrc-2011Q1-base:1.14 pkgsrc-2010Q4:1.14.0.14 pkgsrc-2010Q4-base:1.14 pkgsrc-2010Q3:1.14.0.12 pkgsrc-2010Q3-base:1.14 pkgsrc-2010Q2:1.14.0.10 pkgsrc-2010Q2-base:1.14 pkgsrc-2010Q1:1.14.0.8 pkgsrc-2010Q1-base:1.14 pkgsrc-2009Q4:1.14.0.6 pkgsrc-2009Q4-base:1.14 pkgsrc-2009Q3:1.14.0.4 pkgsrc-2009Q3-base:1.14 pkgsrc-2009Q2:1.14.0.2 pkgsrc-2009Q2-base:1.14 pkgsrc-2009Q1:1.13.0.16 pkgsrc-2009Q1-base:1.13 pkgsrc-2008Q4:1.13.0.14 pkgsrc-2008Q4-base:1.13 pkgsrc-2008Q3:1.13.0.12 pkgsrc-2008Q3-base:1.13 cube-native-xorg:1.13.0.10 cube-native-xorg-base:1.13 pkgsrc-2008Q2:1.13.0.8 pkgsrc-2008Q2-base:1.13 cwrapper:1.13.0.6 pkgsrc-2008Q1:1.13.0.4 pkgsrc-2008Q1-base:1.13 pkgsrc-2007Q4:1.13.0.2 pkgsrc-2007Q4-base:1.13 pkgsrc-2007Q3:1.10.0.2 pkgsrc-2007Q3-base:1.10 pkgsrc-2007Q2:1.7.0.2 pkgsrc-2007Q2-base:1.7 pkgsrc-2007Q1:1.6.0.2 pkgsrc-2007Q1-base:1.6 pkgsrc-2006Q4:1.5.0.16 pkgsrc-2006Q4-base:1.5 pkgsrc-2006Q3:1.5.0.14 pkgsrc-2006Q3-base:1.5 pkgsrc-2006Q2:1.5.0.12 pkgsrc-2006Q2-base:1.5 pkgsrc-2006Q1:1.5.0.10 pkgsrc-2006Q1-base:1.5 pkgsrc-2005Q4:1.5.0.8 pkgsrc-2005Q4-base:1.5 pkgsrc-2005Q3:1.5.0.6 pkgsrc-2005Q3-base:1.5 pkgsrc-2005Q2:1.5.0.4 pkgsrc-2005Q2-base:1.5 pkgsrc-2005Q1:1.5.0.2 pkgsrc-2005Q1-base:1.5 pkgsrc-2004Q4:1.4.0.2 pkgsrc-2004Q4-base:1.4 pkgsrc-2004Q3:1.3.0.8 pkgsrc-2004Q3-base:1.3 pkgsrc-2004Q2:1.3.0.6 pkgsrc-2004Q2-base:1.3 pkgsrc-2004Q1:1.3.0.4 pkgsrc-2004Q1-base:1.3 pkgsrc-2003Q4:1.3.0.2 pkgsrc-2003Q4-base:1.3; locks; strict; comment @# @; 1.25 date 2025.06.17.02.38.49; author gutteridge; state Exp; branches; next 1.24; commitid NWelENkjYFp7MbZF; 1.24 date 2025.05.06.23.46.45; author gutteridge; state Exp; branches; next 1.23; commitid PQZRbJSd730J6UTF; 1.23 date 2022.02.27.02.13.44; author gutteridge; state Exp; branches; next 1.22; commitid pkkbElRHOrYYocuD; 1.22 date 2022.02.27.02.10.45; author gutteridge; state Exp; branches; next 1.21; commitid tj5Mezwla48qncuD; 1.21 date 2020.05.13.19.36.56; author tnn; state Exp; branches; next 1.20; commitid zwhsTEj2pVxod78C; 1.20 date 2020.04.16.12.28.36; author manu; state Exp; branches; next 1.19; commitid A5OTPyvnHRL3JB4C; 1.19 date 2020.04.16.09.47.26; author manu; state Exp; branches; next 1.18; commitid xyKyTr1KHh1VPA4C; 1.18 date 2020.04.11.15.22.52; author tnn; state Exp; branches; next 1.17; commitid MsiOvyPj2nfIQY3C; 1.17 date 2020.03.05.20.49.22; author tnn; state Exp; branches; next 1.16; commitid pCGB0fzpuPACQfZB; 1.16 date 2019.01.06.16.36.00; author tnn; state Exp; branches; next 1.15; commitid jG3NPoQcxriL4K6B; 1.15 date 2017.08.30.10.41.24; author kamil; state Exp; branches; next 1.14; commitid cSbZGrMp6SQpZd5A; 1.14 date 2009.05.17.20.40.46; author seb; state Exp; branches; next 1.13; 1.13 date 2007.12.17.11.13.41; author tron; state Exp; branches; next 1.12; 1.12 date 2007.11.21.21.01.40; author apb; state Exp; branches; next 1.11; 1.11 date 2007.11.21.11.01.55; author apb; state Exp; branches; next 1.10; 1.10 date 2007.08.14.19.59.18; author veego; state Exp; branches; next 1.9; 1.9 date 2007.08.12.15.00.34; author seb; state Exp; branches; next 1.8; 1.8 date 2007.08.12.14.22.49; author seb; state Exp; branches; next 1.7; 1.7 date 2007.05.06.21.41.30; author christos; state Exp; branches; next 1.6; 1.6 date 2007.03.14.11.36.26; author markd; state Exp; branches; next 1.5; 1.5 date 2005.01.17.14.54.01; author atatat; state dead; branches; next 1.4; 1.4 date 2004.11.28.22.39.07; author atatat; state Exp; branches; next 1.3; 1.3 date 2003.11.22.23.19.47; author christos; state dead; branches; next 1.2; 1.2 date 2003.10.04.20.22.35; author atatat; state Exp; branches; next 1.1; 1.1 date 2003.09.26.03.13.04; author atatat; state Exp; branches; next ; desc @@ 1.25 log @lsof: simplify a NetBSD build fix patch Five years ago, r. 1.19 introduced a build fix for "NetBSD 9.0", without any further explanation. It appears this was intended for i386, specifically, though the commit didn't say, since other ports should have built without it. i386 builds have since been fixed differently, this being relevant for 10.x as well, where the older approach would not work. (It's also confusing to see separate places with NetBSD version conditionals pulling in sys/ptrace.h.) Change compile-tested on NetBSD 9.4_STABLE/amd64, 9.4_STABLE/i386, 9.99.14/amd64, 9.99.14/i386. (I see nothing in the state of 9.0 headers that differs relevantly.) Slightly related to PR port-i386/59402. @ text @$NetBSD: patch-af,v 1.24 2025/05/06 23:46:45 gutteridge Exp $ Various build fixes for NetBSD. --- dialects/n+obsd/dlsof.h.orig 2006-03-28 21:54:15.000000000 +0000 +++ dialects/n+obsd/dlsof.h @@@@ -46,6 +46,9 @@@@ #include #include #include +#if (!defined(NETBSDV) || __NetBSD_Version__>=999001900) +#include /* pulled in by procfs.h, but needs to be pulled in before _KERNEL is defined */ +#endif # if defined(HASGETBOOTFILE) #include @@@@ -95,6 +98,10 @@@@ struct uio; /* dummy for function protot # endif /* (defined(OPENBSDV) && OPENBSDV<3030) || (defined(NETBSDV) && __NetBSD_Version__>=106060000) */ +# if defined(NETBSDV) && NETBSDV>=1003000 +#define sockproto NETBSD_sockproto +# endif /* defined(NETBSDV) && NETBSDV>=1003000 */ + #include # if (defined(OPENBSDV) && OPENBSDV>=3030) \ @@@@ -106,10 +113,6 @@@@ struct uio; /* dummy for function protot #include #include -# if defined(NETBSDV) && NETBSDV>=1003000 -#define sockproto NETBSD_sockproto -# endif /* defined(NETBSDV) && NETBSDV>=1003000 */ - #include # if defined(HASMSDOSFS) @@@@ -147,6 +150,9 @@@@ struct uio; /* dummy for function protot || (defined(NETBSDV) && __NetBSD_Version__<106060000) */ #define _KERNEL +#ifndef VFS_PROTOS +#define VFS_PROTOS(x) +#endif struct nameidata; /* to satisfy a function prototype in msdosfsmount.h */ #include #undef _KERNEL @@@@ -161,6 +167,7 @@@@ struct nameidata; /* to satisfy a functi #include #include #include +#include #include #include #include @@@@ -170,7 +177,6 @@@@ struct nameidata; /* to satisfy a functi #include # endif /* defined(HASIPv6) && defined(NETBSDV) && !defined(HASINRIAIPv6) */ -#include #include #include #include @@@@ -264,6 +270,9 @@@@ struct sockproto { #undef KERNEL #include +# if defined(HASTMPFS) +#include +# endif /* defined(HASTMPFS) */ # if defined(HASNFSPROTO) #include @@@@ -360,6 +369,25 @@@@ struct sockproto { # if defined(HASPROCFS_PFSROOT) #define _KERNEL # endif /* defined(HASPROCFS_PFSROOT) */ +# if defined(NETBSDV) +/* + * Needed for definition of curlwp, which isn't used by this code base, + * but is exposed in procfs.h in an inline function declaration. + */ +# if __NetBSD_Version__>=999009300 +extern struct lwp *curlwp; +# endif +/* Work around an issue with i386 where __HAVE_PROCFS_MACHDEP is universally + * defined, but PROCFS_MACHDEP_NODE_TYPES is guarded by _KERNEL. The enum + * value isn't used by this code base, this just fixes the build. This is a + * result of the mess with the (apparently necessary) tricks played with the + * inclusion of sys/ptrace.h above. + */ +# if defined(__HAVE_PROCFS_MACHDEP) && !defined(PROCFS_MACHDEP_NODE_TYPES) +#define PROCFS_MACHDEP_NODE_TYPES \ + Pmachdep_xmmregs, /* extended FP register set */ +# endif +# endif /* defined(NETBSDV) */ #include # if defined(HASPROCFS_PFSROOT) #undef _KERNEL @@@@ -370,7 +398,6 @@@@ struct sockproto { #define Pregs PFSregs #define Pfile PFSfile #define Pfpregs PFSfpregs -#define Pctl PFSctl #define Pstatus PFSstatus #define Pnote PFSnote #define Pnotepg PFSnotepg @@@@ -382,6 +409,9 @@@@ struct sockproto { #define Pmap PFSmap #define Pmaps PFSmaps # endif /* NETBSDV>=1006000 */ +# if NETBSDV<8099000 +#define Pctl PFSctl +# endif /* NETBSDV<8099000 */ # endif /* defined(NetBSDV) */ # endif /* defined(HASPROCFS_PFSROOT) */ #include @@@@ -489,7 +519,12 @@@@ extern KA_T Kpa; struct l_vfs { KA_T addr; /* kernel address */ fsid_t fsid; /* file system ID */ +#if defined(NETBSDV) && __NetBSD_Version__ >= 499002500 + /* MFSNAMELEN was removed from the kernel source after 4.99.24 */ + char type[sizeof(((struct statvfs *)NULL)->f_fstypename)]; /* type of file system */ +#else char type[MFSNAMELEN]; /* type of file system */ +#endif char *dir; /* mounted directory */ char *fsname; /* file system name */ struct l_vfs *next; /* forward link */ @@@@ -565,7 +600,7 @@@@ struct sfile { #define NCACHE_NODEADDR nc_vp /* node address in NCACHE */ #define NCACHE_PARADDR nc_dvp /* parent node address in NCACHE */ -# if (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1002000) +# if (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1002000 && __NetBSD_Version__ < 999005400) #define NCACHE_NXT nc_hash.le_next /* link in NCACHE */ # else /* (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1002000) */ # if defined(NetBSD1_0) && NetBSD<1994101 @@@@ -581,4 +616,12 @@@@ 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 +#else +#define VNODE_VFLAG v_flag +#define NCACHE_VROOT VROOT +#endif /* VV_ROOT */ + #endif /* NETBSD_LSOF_H */ @ 1.24 log @lsof: fix NetBSD i386 builds ptrace.h is being included in a messy way to kludge around other build issues, which then leads to this particular breakage on i386 only. Consistently defining or not defining both macros both fix this. lsof has no need of that particular enum value provided by PROCFS_MACHDEP_NODE_TYPES, anyway. Tangentially related to PR port-i386/59402; this code/our patching is doing unexpected things, but i386's ptrace.h does seem inconsistently defined, too. @ text @d1 1 a1 1 $NetBSD: patch-af,v 1.23 2022/02/27 02:13:44 gutteridge Exp $ d75 1 a75 1 @@@@ -360,6 +369,28 @@@@ struct sockproto { a79 3 +# if __NetBSD_Version__>=900000000 +#include +# endif d101 1 a101 1 @@@@ -370,7 +401,6 @@@@ struct sockproto { d109 1 a109 1 @@@@ -382,6 +412,9 @@@@ struct sockproto { d119 1 a119 1 @@@@ -489,7 +522,12 @@@@ extern KA_T Kpa; d132 1 a132 1 @@@@ -565,7 +603,7 @@@@ struct sfile { d141 1 a141 1 @@@@ -581,4 +619,12 @@@@ struct sfile { @ 1.23 log @lsof: fix typo in comment in previous commit @ text @d1 3 a3 1 $NetBSD: patch-af,v 1.22 2022/02/27 02:10:45 gutteridge Exp $ d75 1 a75 1 @@@@ -360,6 +369,16 @@@@ struct sockproto { d79 2 a80 1 +#if (defined(NETBSDV) && __NetBSD_Version__>=900000000) d82 1 a82 1 +#endif d87 1 a87 1 +#if (defined(NETBSDV) && __NetBSD_Version__>=999009300) d89 12 a100 1 +#endif d104 1 a104 1 @@@@ -370,7 +389,6 @@@@ struct sockproto { d112 1 a112 1 @@@@ -382,6 +400,9 @@@@ struct sockproto { d122 1 a122 1 @@@@ -489,7 +510,12 @@@@ extern KA_T Kpa; d135 1 a135 1 @@@@ -565,7 +591,7 @@@@ struct sfile { d144 1 a144 1 @@@@ -581,4 +607,12 @@@@ struct sfile { @ 1.22 log @lsof: fix builds on NetBSD as of 9.99.93 on 2022-01-17 procfs.h had an inline function added that expects curlwp to be defined. It isn't needed by this code base, and I don't see any other way of fixing this than adding a basic definition to get this to compile. It looks "wrong", but this code base requires _KERNEL to be defined when including procfs.h, but we can't include lwp.h or machine/ cpu.h with that defined, header files that aren't available to userland get referenced and break the build that way, instead. @ text @d1 1 a1 1 $NetBSD: patch-af,v 1.21 2020/05/13 19:36:56 tnn Exp $ d82 1 a82 1 + * but is exposed in procfs.h in an inline function declaraion. @ 1.21 log @lsof: fix wrong conditional added in patch-af 1.20 machine/ptrace.h pulls in sys/module_hook.h after 2019-11-27 under _KERNEL This corresponds to NetBSD 9.99.19. sys/module_hook.h is not installed. Ergo sys/ptrace.h must be included /without/ defining _KERNEL. @ text @d1 1 a1 1 $NetBSD: patch-af,v 1.20 2020/04/16 12:28:36 manu Exp $ d3 3 a5 4 --- dialects/n+obsd/dlsof.h.orig 2006-03-28 23:54:15.000000000 +0200 +++ dialects/n+obsd/dlsof.h 2020-04-16 14:25:29.349520955 +0200 @@@@ -45,8 +45,11 @@@@ #include d15 1 a15 3 # endif /* defined(HASGETBOOTFILE) */ @@@@ -94,8 +97,12 @@@@ #define _KERNEL d26 1 a26 3 || (defined(NETBSDV) && __NetBSD_Version__>=106060000) @@@@ -105,12 +112,8 @@@@ d37 1 a37 3 # if HASMSDOSFS==1 @@@@ -146,8 +149,11 @@@@ # endif /* (defined(OPENBSDV) && OPENBSDV<3030) d47 1 a47 3 #include @@@@ -160,8 +166,9 @@@@ d55 1 a55 3 @@@@ -169,9 +176,8 @@@@ #include d63 1 a63 3 #include @@@@ -263,8 +269,11 @@@@ #endif /* defined(HASBUFQ_H) */ d73 1 a73 3 #include @@@@ -359,8 +368,11 @@@@ # if defined(HASPROCFS) d80 7 d90 1 a90 3 #define Proot PFSroot @@@@ -369,9 +381,8 @@@@ #define Pmem PFSmem d98 1 a98 3 # if defined(NetBSDV) @@@@ -381,8 +392,11 @@@@ # if NETBSDV>=1006000 d108 1 a108 3 # endif /* defined(HASPROCFS) */ @@@@ -488,9 +502,14 @@@@ d121 1 a121 3 }; @@@@ -564,9 +583,9 @@@@ #define NCACHE_NMLEN nc_nlen /* name length in NCACHE */ d130 1 a130 3 #define NCACHE_NXT nc_nxt /* link in NCACHE */ @@@@ -580,5 +599,13 @@@@ #define NCACHE_NODEID nc_vpid /* node ID in NCACHE */ @ 1.20 log @Use fix for NetBSD 9.0 only on NetBSD 9.0, avoid changing other things. Thanks to wiz@@ @ text @d1 1 a1 1 $NetBSD$ d10 1 a10 1 +#if (!defined(NETBSDV) || __NetBSD_Version__<900000000) @ 1.19 log @Fix build on NetBSD 9.0 @ text @d1 1 a1 2 $NetBSD: patch-af,v 1.17 2020/03/05 20:49:22 tnn Exp $ d4 14 a17 2 +++ dialects/n+obsd/dlsof.h 2020-04-10 16:35:54.222640631 +0200 @@@@ -94,8 +94,12 @@@@ d30 1 a30 1 @@@@ -105,12 +109,8 @@@@ d43 1 a43 1 @@@@ -146,8 +146,11 @@@@ d55 1 a55 1 @@@@ -160,8 +163,9 @@@@ d65 1 a65 1 @@@@ -169,9 +173,8 @@@@ d75 1 a75 1 @@@@ -263,8 +266,11 @@@@ d87 1 a87 1 @@@@ -359,8 +365,9 @@@@ d92 1 d94 1 d99 1 a99 1 @@@@ -369,9 +376,8 @@@@ d109 1 a109 1 @@@@ -381,8 +387,11 @@@@ d121 1 a121 1 @@@@ -488,9 +497,14 @@@@ d136 12 a147 1 @@@@ -580,5 +594,13 @@@@ @ 1.18 log @lsof: disable loading of kernel namecache on NetBSD after 9.99.54 lsof expects to be able to walk the namecache as a linked list using kmem grovelling. The namecache on NetBSD now uses rbtree instead of hash buckets + linked list. While it's certainly possible to iterate an rbtree using kmem it's also more complicated and code doesn't exist yet. Unfortunately this means lsof for now doesn't resolve pathnames for type VREG. @ text @d1 1 a1 1 $NetBSD: patch-af,v 1.15 2017/08/30 10:41:24 kamil Exp $ d3 5 a7 11 --- dialects/n+obsd/dlsof.h.orig 2006-03-28 21:54:15.000000000 +0000 +++ dialects/n+obsd/dlsof.h @@@@ -46,6 +46,7 @@@@ #include #include #include +#include /* pulled in by procfs.h, but needs to be pulled in before _KERNEL is defined */ # if defined(HASGETBOOTFILE) #include @@@@ -95,6 +96,10 @@@@ struct uio; /* dummy for function protot d18 3 a20 1 @@@@ -106,10 +111,6 @@@@ struct uio; /* dummy for function protot d31 3 a33 1 @@@@ -147,6 +148,9 @@@@ struct uio; /* dummy for function protot d43 3 a45 1 @@@@ -161,6 +165,7 @@@@ struct nameidata; /* to satisfy a functi d53 3 a55 1 @@@@ -170,7 +175,6 @@@@ struct nameidata; /* to satisfy a functi d63 3 a65 1 @@@@ -264,6 +268,9 @@@@ struct sockproto { d75 13 a87 1 @@@@ -370,7 +377,6 @@@@ struct sockproto { d95 3 a97 1 @@@@ -382,6 +388,9 @@@@ struct sockproto { d107 3 a109 1 @@@@ -489,7 +498,12 @@@@ extern KA_T Kpa; d122 3 a124 10 @@@@ -565,7 +579,7 @@@@ struct sfile { #define NCACHE_NODEADDR nc_vp /* node address in NCACHE */ #define NCACHE_PARADDR nc_dvp /* parent node address in NCACHE */ -# if (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1002000) +# if (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1002000 && __NetBSD_Version__ < 999005400) #define NCACHE_NXT nc_hash.le_next /* link in NCACHE */ # else /* (defined(OPENBSDV) && OPENBSDV>=2010) || (defined(NETBSDV) && NETBSDV>=1002000) */ # if defined(NetBSD1_0) && NetBSD<1994101 @@@@ -581,4 +595,12 @@@@ struct sfile { @ 1.17 log @lsof: fix build on -current @ text @d102 9 @ 1.16 log @lsof: fix build on -current @ text @d5 9 a13 1 @@@@ -95,6 +95,10 @@@@ struct uio; /* dummy for function protot d24 1 a24 1 @@@@ -106,10 +110,6 @@@@ struct uio; /* dummy for function protot d35 1 a35 1 @@@@ -147,6 +147,9 @@@@ struct uio; /* dummy for function protot d45 1 a45 1 @@@@ -161,6 +164,7 @@@@ struct nameidata; /* to satisfy a functi d53 1 a53 1 @@@@ -170,7 +174,6 @@@@ struct nameidata; /* to satisfy a functi d61 1 a61 1 @@@@ -264,6 +267,9 @@@@ struct sockproto { d71 1 a71 1 @@@@ -370,7 +376,6 @@@@ struct sockproto { d79 1 a79 1 @@@@ -382,6 +387,9 @@@@ struct sockproto { d89 1 a89 1 @@@@ -489,7 +497,12 @@@@ extern KA_T Kpa; d102 1 a102 1 @@@@ -581,4 +594,12 @@@@ struct sfile { @ 1.15 log @Fix lsof build on NetBSD-8.99.2 Address /proc/#/ctl removal fallout. @ text @d1 1 a1 1 $NetBSD: patch-af,v 1.14 2009/05/17 20:40:46 seb Exp $ d27 11 a37 1 @@@@ -161,6 +161,7 @@@@ struct nameidata; /* to satisfy a functi d45 1 a45 1 @@@@ -170,7 +171,6 @@@@ struct nameidata; /* to satisfy a functi d53 1 a53 1 @@@@ -264,6 +264,9 @@@@ struct sockproto { d63 1 a63 1 @@@@ -370,7 +373,6 @@@@ struct sockproto { d71 1 a71 1 @@@@ -382,6 +384,9 @@@@ struct sockproto { d81 1 a81 1 @@@@ -489,7 +494,12 @@@@ extern KA_T Kpa; d94 1 a94 1 @@@@ -581,4 +591,12 @@@@ struct sfile { @ 1.14 log @Fix build on NetBSD 3.1_STABLE, tested on i386 and sparc64. Also built/tested ok on NetBSD/i386 4.0.1 and 5.0. @ text @d1 1 a1 1 $NetBSD$ d53 19 a71 1 @@@@ -489,7 +492,12 @@@@ extern KA_T Kpa; d84 1 a84 1 @@@@ -581,4 +589,12 @@@@ struct sfile { @ 1.13 log @Fix build under NetBSD 4.0 and older. @ text @d1 1 a1 1 $NetBSD: patch-af,v 1.12 2007/11/21 21:01:40 apb Exp $ d3 1 a3 1 --- dialects/n+obsd/dlsof.h.orig 2006-03-28 23:54:15.000000000 +0200 d5 22 @ 1.12 log @We need to define VNODE_VFLAG and NCACHE_VROOT to build on older versions of NetBSD. Thanks to PR/37393 from Yakovetsky Vladimir for the hint. @ text @d1 1 a1 1 $NetBSD: patch-af,v 1.11 2007/11/21 11:01:55 apb Exp $ d53 1 a53 1 +#define NCACHE_VROOT V_ROOT @ 1.11 log @Make lsof build on NetBSD >= 4.99.33. @ text @d1 1 a1 1 $NetBSD: patch-af,v 1.10 2007/08/14 19:59:18 veego Exp $ d44 1 a44 1 @@@@ -581,4 +589,9 @@@@ struct sfile { d51 3 @ 1.10 log @- Don't hardcode the MFSNAMELEN length, inspired by commits from Christos (patch-ae and patch-af). Fix PR 36680 - Define NETBSD_SYS in the pkgsrc Makefile so it works if NETBSDSRCDIR is not pointing to a default location and thus some featues, like ptyfs support were disabled - Update the line numbers in patch-aa - Add tmpfs support (patch-ad, patch-af and patch-ag) - Update the NetBSD versions in Configure otherwise NETBSDV would fall back to 1006000 and so at least one feature was not found, the PFSfd procfs support (patch-ag) - Bump pkg revision for new features (normaly I wouldn't have bumped the version if it were only to fix a -current compile, because the version also includes the kernel version) @ text @d1 1 a1 1 $NetBSD: patch-af,v 1.9 2007/08/12 15:00:34 seb Exp $ d4 2 a5 2 +++ dialects/n+obsd/dlsof.h 2007-08-11 18:16:59.000000000 +0200 @@@@ -161,6 +161,7 @@@@ d13 1 a13 1 @@@@ -170,7 +171,6 @@@@ d21 1 a21 1 @@@@ -264,6 +264,9 @@@@ d31 1 a31 1 @@@@ -489,7 +492,12 @@@@ d44 10 @ 1.9 log @Revert previous fix at veego@@ request. @ text @d1 1 a1 1 $NetBSD: patch-af,v 1.7 2007/05/06 21:41:30 christos Exp $ d3 2 a4 2 --- dialects/n+obsd/dlsof.h.orig 2006-03-28 16:54:15.000000000 -0500 +++ dialects/n+obsd/dlsof.h 2007-05-06 17:37:00.000000000 -0400 d21 23 @ 1.8 log @Fix build on NetBSD-current which dropped MFSNAMELEN: pretend this CPP macro is still there. @ text @d3 3 a5 14 --- dialects/n+obsd/dlsof.h.orig 2006-03-28 21:54:15.000000000 +0000 +++ dialects/n+obsd/dlsof.h @@@@ -97,6 +97,10 @@@@ struct uio; /* dummy for function protot #include +#if defined(NETBSDV) && !defined(MFSNAMELEN) && defined(_VFS_NAMELEN) +#define MFSNAMELEN _VFS_NAMELEN +#endif + # if (defined(OPENBSDV) && OPENBSDV>=3030) \ || (defined(NETBSDV) && __NetBSD_Version__>=106060000) #undef _KERNEL @@@@ -161,6 +165,7 @@@@ struct nameidata; /* to satisfy a functi d13 1 a13 1 @@@@ -170,7 +175,6 @@@@ struct nameidata; /* to satisfy a functi @ 1.7 log @upgrade to 4.78 @ text @d1 1 a1 1 $NetBSD$ d3 14 a16 3 --- dialects/n+obsd/dlsof.h.orig 2006-03-28 16:54:15.000000000 -0500 +++ dialects/n+obsd/dlsof.h 2007-05-06 17:37:00.000000000 -0400 @@@@ -161,6 +161,7 @@@@ d24 1 a24 1 @@@@ -170,7 +171,6 @@@@ @ 1.6 log @Update lsof to 4.77. Include official patch to fix build on Solaris 10 06/06 or newer. Fix HOMEPAGE. The April 10, 2006 revision (4.77): adds Solaris 10 and above -X option selection of the display of unlinked file cached paths; improved reporting of Solaris 10 cached path names of questionable accuracy; has FreeBSD 7.0-CURRENT update; fixes name addition spacing bug; has limited SAMFS support for Solaris 10; fixes an HP-UX 11 file "chunk" size problem; updates for FreeBSD 6.0; updates scripts/sort_res.perl5; corrects +|-M man page error; improves FreeBSD user device random seed generation; documents in 00FAQ bundled C and gcc compilation failures on HP-UX 11.23 dated May 2005 or later; corrects bugs and eliminates compiler warnings in PSTAT-based HP-UX lsof and in the lsof test suite; changed the method of reporting unknown file types; dropped the *claim* that lsof works on BSDI BSD/OS; enables compilation on Solaris 10 1/06; adjusts to FreeBSD 5.5-PRELELEASE and 6.1-PRERELEASE; fixes locating AIX ATI sockets by their associated TCP/IP addresses; adjusts to OpenBSD 3.[89]; ends 32 bit Solaris 8 testing (testing on 64 bit Solaris 8 continues.) @ text @d3 18 a20 14 Official lsof patch to fix build with newer Solaris 10s. *** /tmp/T0dLaqXT Tue Jul 18 23:11:15 2006 --- dialects/sun/machine.h Mon Jul 10 19:59:17 2006 *************** *** 76,81 **** --- 76,82 ---- # if solaris>=80000 #include + #include #define _KERNEL 1 #include #undef _KERNEL @ 1.5 log @Upgrade to lsof version 4.74, thereby getting rid of most of the accumulated patches. Changes related to or affecting NetBSD (or pkgsrc) from the 00DIST file: 4.74 January 17, 2005 ... Updated lsof for NetBSD 2.99.10 and tested it on a system provided by Andrew Brown . ... Added BSDI, FreeBSD, NetBSD and OpenBSD support for the *effnlink member of the inode structure. This makes the lsof LTnlink test run faster on all modified dialects and correctly on OpenBSD. Added ptyfs support for NetBSD, using modifications provided by Andrew Brown. Changed the netbsd Configure stanza to look by default for system header files in both /usr/include and /usr/src. (The NETBSD_SYS environment variable can still be used to select an alternate for /usr/src.) ... @ text @d1 1 a1 1 $NetBSD: patch-af,v 1.4 2004/11/28 22:39:07 atatat Exp $ d3 1 a3 4 Incorporate a patch from the author that widens the NETBSDV definition to account for new current versioning system, properly handles the sys/bufq.h mess, adds a bit more to procfs support, and adds ptyfs support. d5 12 a16 14 --- dialects/n+obsd/dsock.c.orig 2004-03-10 18:51:38.000000000 -0500 +++ dialects/n+obsd/dsock.c @@@@ -79,9 +79,9 @@@@ process_socket(sa) #define UNPADDR_IN_MBUF #if defined(NETBSDV) -# if NETBSDV>=1040 +# if NETBSDV>=1004000 #undef UNPADDR_IN_MBUF -# endif /* NETBSDV>=1040 */ +# endif /* NETBSDV>=1004000 */ #endif /* defined(NETBSDV) */ #if defined(UNPADDR_IN_MBUF) @ 1.4 log @Tweak the sys/bufq.h support (it disappeared again), enhance the procfs support a little, incorporate the author's patches to deal with netbsd-current version numbers getting longer, and add ptyfs support. These patches are adapted from an interim release the author made and will appear in the next full release. PKGREVISION bumped to 1 for the ptyfs support. @ text @d1 1 a1 1 $NetBSD$ @ 1.3 log @4.69 is out, 4.68 is gone. Approved by agc. @ text @d1 1 a1 1 $NetBSD: patch-af,v 1.2 2003/10/04 20:22:35 atatat Exp $ d3 4 a6 1 Deal with recent procfs and kernfs churn on the -current branch. d8 4 a11 18 --- dialects/n+obsd/dlsof.h.orig 2003-06-11 07:44:54.000000000 -0400 +++ dialects/n+obsd/dlsof.h @@@@ -62,6 +62,7 @@@@ #define _KERNEL # if defined(NETBSDV) struct buf; /* dummy for function prototype in */ +struct uio; /* dummy for function prototype in */ # endif /* defined(NETBSDV) */ #include # endif /* (defined(OPENBSDV) && OPENBSDV>=3030) @@@@ -253,6 +254,9 @@@@ struct sockproto { #define _KERNEL #include #undef _KERNEL +# if defined(HASKERNFS_KFS_KT) +#define kf_kt kfs_kt +# endif /* defined(HASKERNFS_KFS_KT) */ # endif /* defined(HASKERNFS) */ d13 7 a19 25 # if defined(HASNULLFS) @@@@ -266,7 +270,24 @@@@ struct sockproto { # endif /* defined(HASNULLFS) */ # if defined(HASPROCFS) +# if defined(HASPROCFS_PFSROOT) +#define _KERNEL +# endif /* defined(HASPROCFS_PFSROOT) */ #include +# if defined(HASPROCFS_PFSROOT) +#undef _KERNEL +#define Proot PFSroot +#define Pproc PFSproc +#define Pcurproc PFScurproc +#define Pmem PFSmem +#define Pregs PFSregs +#define Pfile PFSfile +#define Pfpregs PFSfpregs +#define Pctl PFSctl +#define Pstatus PFSstatus +#define Pnote PFSnote +#define Pnotepg PFSnotepg +# endif /* defined(HASPROCFS_PFSROOT) */ #include # endif /* defined(HASPROCFS) */ d21 1 @ 1.2 log @Refix build on -current now that procfs and kernfs have churned again. @ text @d1 1 a1 1 $NetBSD: patch-af,v 1.1 2003/09/26 03:13:04 atatat Exp $ @ 1.1 log @Make lsof build under -current again @ text @d1 3 a3 1 $NetBSD$ d15 35 @