pkgsrc-Changes archive

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

CVS commit: pkgsrc/sysutils/lsof



Module Name:    pkgsrc
Committed By:   gutteridge
Date:           Tue May  6 23:46:45 UTC 2025

Modified Files:
        pkgsrc/sysutils/lsof: distinfo
        pkgsrc/sysutils/lsof/patches: patch-af

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 pkgsrc/sysutils/lsof/distinfo
cvs rdiff -u -r1.23 -r1.24 pkgsrc/sysutils/lsof/patches/patch-af

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

Modified files:

Index: pkgsrc/sysutils/lsof/distinfo
diff -u pkgsrc/sysutils/lsof/distinfo:1.107 pkgsrc/sysutils/lsof/distinfo:1.108
--- pkgsrc/sysutils/lsof/distinfo:1.107 Sun Apr 28 01:33:06 2024
+++ pkgsrc/sysutils/lsof/distinfo       Tue May  6 23:46:45 2025
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.107 2024/04/28 01:33:06 gutteridge Exp $
+$NetBSD: distinfo,v 1.108 2025/05/06 23:46:45 gutteridge Exp $
 
 BLAKE2s (lsof_4.91.tar.bz2) = 77109e036c36f7d1483e69f2aae2314830dc4d2bdc3bf88a4031832f17e6afef
 SHA512 (lsof_4.91.tar.bz2) = 49f811941dd6303f7cb0655fddb8b1177af5d1b18f2bd1edfab09d2c128aea73daecf09c7a5375979c66ba764c88a6e70c9086b55c3634e3be01ab1aa12e9f92
@@ -8,7 +8,7 @@ SHA1 (patch-ab) = 1501d8b0e6fd2c61949ba0
 SHA1 (patch-ac) = ab1dc4540452f413493c58b729c7c6de83abfb6a
 SHA1 (patch-ad) = 7f639e8832c2da8e498c33a38ecbc7b3d3a7430a
 SHA1 (patch-ae) = 3f4a7ce54c0646941fd86400f91a2d17e9d2354a
-SHA1 (patch-af) = 88b3d2b42c05e20c189fa00fd65f1f412fe54038
+SHA1 (patch-af) = 3d9e166e9a7d6adeff286b769e89cef7f2c9e9c1
 SHA1 (patch-ag) = 8842f295905c463dbef145ce8b2a0572b6e83d91
 SHA1 (patch-ah) = 2de22b9a3733f958298af5e33b66c0653c320f59
 SHA1 (patch-dialects_n+obsd_dnode1.c) = dc8c766760aca4eb2e7d7af3944260dd49795c09

Index: pkgsrc/sysutils/lsof/patches/patch-af
diff -u pkgsrc/sysutils/lsof/patches/patch-af:1.23 pkgsrc/sysutils/lsof/patches/patch-af:1.24
--- pkgsrc/sysutils/lsof/patches/patch-af:1.23  Sun Feb 27 02:13:44 2022
+++ pkgsrc/sysutils/lsof/patches/patch-af       Tue May  6 23:46:45 2025
@@ -1,4 +1,6 @@
-$NetBSD: patch-af,v 1.23 2022/02/27 02:13:44 gutteridge Exp $
+$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
@@ -70,24 +72,36 @@ $NetBSD: patch-af,v 1.23 2022/02/27 02:1
  
  # if  defined(HASNFSPROTO)
  #include <nfs/rpcv2.h>
-@@ -360,6 +369,16 @@ struct sockproto {
+@@ -360,6 +369,28 @@ struct sockproto {
  #  if defined(HASPROCFS_PFSROOT)
  #define       _KERNEL
  #  endif      /* defined(HASPROCFS_PFSROOT) */
-+#if (defined(NETBSDV) && __NetBSD_Version__>=900000000)
++#  if defined(NETBSDV)
++#    if __NetBSD_Version__>=900000000
 +#include <sys/ptrace.h>
-+#endif
++#    endif
 +/* 
 + * 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 (defined(NETBSDV) && __NetBSD_Version__>=999009300)
++#    if __NetBSD_Version__>=999009300
 +extern struct lwp     *curlwp;
-+#endif
++#    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 <miscfs/procfs/procfs.h>
  #  if defined(HASPROCFS_PFSROOT)
  #undef        _KERNEL
-@@ -370,7 +389,6 @@ struct sockproto {
+@@ -370,7 +401,6 @@ struct sockproto {
  #define       Pregs           PFSregs
  #define       Pfile           PFSfile
  #define       Pfpregs         PFSfpregs
@@ -95,7 +109,7 @@ $NetBSD: patch-af,v 1.23 2022/02/27 02:1
  #define       Pstatus         PFSstatus
  #define       Pnote           PFSnote
  #define       Pnotepg         PFSnotepg
-@@ -382,6 +400,9 @@ struct sockproto {
+@@ -382,6 +412,9 @@ struct sockproto {
  #define       Pmap            PFSmap
  #define       Pmaps           PFSmaps
  #    endif    /* NETBSDV>=1006000 */
@@ -105,7 +119,7 @@ $NetBSD: patch-af,v 1.23 2022/02/27 02:1
  #   endif     /* defined(NetBSDV) */
  #  endif      /* defined(HASPROCFS_PFSROOT) */
  #include <machine/reg.h>
-@@ -489,7 +510,12 @@ extern KA_T Kpa;
+@@ -489,7 +522,12 @@ extern KA_T Kpa;
  struct l_vfs {
        KA_T addr;                      /* kernel address */
        fsid_t  fsid;                   /* file system ID */
@@ -118,7 +132,7 @@ $NetBSD: patch-af,v 1.23 2022/02/27 02:1
        char *dir;                      /* mounted directory */
        char *fsname;                   /* file system name */
        struct l_vfs *next;             /* forward link */
-@@ -565,7 +591,7 @@ struct sfile {
+@@ -565,7 +603,7 @@ struct sfile {
  #define       NCACHE_NODEADDR nc_vp           /* node address in NCACHE */
  #define       NCACHE_PARADDR  nc_dvp          /* parent node address in NCACHE */
  
@@ -127,7 +141,7 @@ $NetBSD: patch-af,v 1.23 2022/02/27 02:1
  #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 +607,12 @@ struct sfile {
+@@ -581,4 +619,12 @@ struct sfile {
  #  endif      /* defined(HASNCVPID) */
  # endif  /* defined(HASNCACHE) */
  



Home | Main Index | Thread Index | Old Index