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: taca
Date: Thu Oct 29 20:59:17 UTC 2026
Modified Files:
pkgsrc/sysutils/lsof: Makefile distinfo
pkgsrc/sysutils/lsof/patches: patch-dialects_n+obsd_dproc.c
Removed Files:
pkgsrc/sysutils/lsof/patches: patch-ah
Log Message:
sysutils/lsof: Really stop warning at start up.
* Really stop warning at start up.
This fix is provided from Yoshitaka Tokugawa <toku at tokugawa.org>.
* Merge patch-ah into patch-dialects_n+obsd_dproc.c.
Bump PKGREVISION.
To generate a diff of this commit:
cvs rdiff -u -r1.148 -r1.149 pkgsrc/sysutils/lsof/Makefile
cvs rdiff -u -r1.114 -r1.115 pkgsrc/sysutils/lsof/distinfo
cvs rdiff -u -r1.5 -r0 pkgsrc/sysutils/lsof/patches/patch-ah
cvs rdiff -u -r1.1 -r1.2 \
pkgsrc/sysutils/lsof/patches/patch-dialects_n+obsd_dproc.c
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/Makefile
diff -u pkgsrc/sysutils/lsof/Makefile:1.148 pkgsrc/sysutils/lsof/Makefile:1.149
--- pkgsrc/sysutils/lsof/Makefile:1.148 Thu May 28 23:16:38 2026
+++ pkgsrc/sysutils/lsof/Makefile Thu Oct 29 20:59:17 2026
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.148 2026/05/28 23:16:38 thorpej Exp $
+# $NetBSD: Makefile,v 1.149 2026/10/29 20:59:17 taca Exp $
DISTNAME= lsof_4.91
PKGNAME= ${DISTNAME:S/_/-/}
-PKGREVISION= 10
+PKGREVISION= 11
CATEGORIES= sysutils
MASTER_SITES= ftp://ftp.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/unix/lsof/
MASTER_SITES+= ftp://ftp.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/unix/lsof/OLD/
Index: pkgsrc/sysutils/lsof/distinfo
diff -u pkgsrc/sysutils/lsof/distinfo:1.114 pkgsrc/sysutils/lsof/distinfo:1.115
--- pkgsrc/sysutils/lsof/distinfo:1.114 Thu May 28 23:16:38 2026
+++ pkgsrc/sysutils/lsof/distinfo Thu Oct 29 20:59:17 2026
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.114 2026/05/28 23:16:38 thorpej Exp $
+$NetBSD: distinfo,v 1.115 2026/10/29 20:59:17 taca Exp $
BLAKE2s (lsof_4.91.tar.bz2) = 77109e036c36f7d1483e69f2aae2314830dc4d2bdc3bf88a4031832f17e6afef
SHA512 (lsof_4.91.tar.bz2) = 49f811941dd6303f7cb0655fddb8b1177af5d1b18f2bd1edfab09d2c128aea73daecf09c7a5375979c66ba764c88a6e70c9086b55c3634e3be01ab1aa12e9f92
@@ -10,8 +10,7 @@ SHA1 (patch-ad) = c977ea106d067ad91d3abc
SHA1 (patch-ae) = 3f4a7ce54c0646941fd86400f91a2d17e9d2354a
SHA1 (patch-af) = 96228c315f850341e4e361810acb0a34ded488bb
SHA1 (patch-ag) = d973ccfced801b57c9dbefd97ee624d4fa2e002c
-SHA1 (patch-ah) = 2de22b9a3733f958298af5e33b66c0653c320f59
SHA1 (patch-dialects_n+obsd_dnode1.c) = dc8c766760aca4eb2e7d7af3944260dd49795c09
-SHA1 (patch-dialects_n+obsd_dproc.c) = a7e4f1f64319906520a392bf0faf291e445c3d19
+SHA1 (patch-dialects_n+obsd_dproc.c) = 1a944d6c882638f989b2c970585e86de8a0f472c
SHA1 (patch-dialects_n+obsd_dsock.c) = dadbb0196024c12f59d77b838917036bf90a4e35
SHA1 (patch-lib_Makefile.skel) = abfb9d50eef60c5d43cbf4978bf179de0ebe371e
Index: pkgsrc/sysutils/lsof/patches/patch-dialects_n+obsd_dproc.c
diff -u pkgsrc/sysutils/lsof/patches/patch-dialects_n+obsd_dproc.c:1.1 pkgsrc/sysutils/lsof/patches/patch-dialects_n+obsd_dproc.c:1.2
--- pkgsrc/sysutils/lsof/patches/patch-dialects_n+obsd_dproc.c:1.1 Thu Apr 23 21:23:11 2026
+++ pkgsrc/sysutils/lsof/patches/patch-dialects_n+obsd_dproc.c Thu Oct 29 20:59:17 2026
@@ -1,10 +1,45 @@
-$NetBSD: patch-dialects_n+obsd_dproc.c,v 1.1 2026/04/23 21:23:11 kim Exp $
+$NetBSD: patch-dialects_n+obsd_dproc.c,v 1.2 2026/10/29 20:59:17 taca Exp $
-Do not include _STABLE, _RC, etc. suffixes in version comparison.
+* Various build fixes for NetBSD.
+* Do not include _STABLE, _RC, etc. suffixes in version comparison.
---- dialects/n+obsd/dproc.c.orig 2005-05-11 15:54:00.000000000 +0300
-+++ dialects/n+obsd/dproc.c 2025-07-18 11:02:20.123676193 +0300
-@@ -81,6 +81,19 @@
+--- dialects/n+obsd/dproc.c.orig 2005-05-11 12:54:00.000000000 +0000
++++ dialects/n+obsd/dproc.c
+@@ -37,6 +37,33 @@ static char *rcsid = "$Id: dproc.c,v 1.1
+
+ #include "lsof.h"
+
++#if __NetBSD_Version__ >= 499006200
++ /*
++ * In NetBSD-4.99.62, struct fdfile was added, struct filedesc::fd_ofiles
++ * changed type from struct file ** to struct fdfile **, and
++ * fd_ofileflags disappeared from struct filedesc, being
++ * replaced by fields in struct fdfile.
++ */
++# define HAVE_STRUCT_FDFILE 1
++# define FILESTRUCT struct fdfile
++#else
++# undef HAVE_STRUCT_FDFILE
++# define FILESTRUCT struct file
++#endif
++#if __NetBSD_Version__ >= 599001400
++ /*
++ * Between NetBSD-5.99.13 and 5.99.14, struct fdtab was added, and
++ * struct filedesc::fd_ofiles and fd_nfiles were replaced by
++ * struct filedesc::fd_dt (a pointer to struct fdtab).
++ */
++# define HAVE_STRUCT_FDTAB 1
++# define NFILES(fd,dt) ((dt).dt_nfiles)
++# define OFILES(fd,dt) ((fd).fd_dt->dt_ff)
++#else
++# undef HAVE_STRUCT_FDTAB
++# define NFILES(fd,dt) ((fd).fd_nfiles)
++# define OFILES(fd,dt) ((fd).fd_ofiles)
++#endif
+
+ _PROTOTYPE(static void enter_vn_text,(KA_T va, int *n));
+ _PROTOTYPE(static void get_kernel_access,(void));
+@@ -81,6 +108,24 @@ ckkv(d, er, ev, ea)
Pn, strerror(errno));
Exit(1);
}
@@ -15,12 +50,114 @@ Do not include _STABLE, _RC, etc. suffix
+ */
+ {
+ char *vp;
++ char tmp_er[64];
+ vp = strchr(v, '_');
+ if (vp != NULL)
+ *vp = '\0';
++ er = strcpy(tmp_er, er ? er : "UNKNOWN");
++ vp = strchr(er, '_');
++ if (vp != NULL)
++ *vp = '\0';
+ }
+#endif
+
/*
* Warn if the actual and expected releases don't match.
*/
+@@ -152,7 +197,7 @@ gather_proc_info()
+ struct filedesc fd;
+ int i, nf;
+ MALLOC_S nb;
+- static struct file **ofb = NULL;
++ static FILESTRUCT **ofb = NULL;
+ static int ofbb = 0;
+ short pss, sf;
+ int px;
+@@ -179,6 +224,10 @@ gather_proc_info()
+ struct kinfo_proc *p;
+ #endif /* defined(HASKVMGETPROC2) */
+
++#if HAVE_STRUCT_FDTAB
++ struct fdtab dt;
++#endif /* HAVE_STRUCT_FDTAB */
++
+ /*
+ * Read the process table.
+ */
+@@ -218,7 +267,14 @@ gather_proc_info()
+ if (!p->P_FD
+ || kread((KA_T)p->P_FD, (char *)&fd, sizeof(fd)))
+ continue;
+- if (!fd.fd_refcnt || fd.fd_lastfile > fd.fd_nfiles)
++ if (!fd.fd_refcnt)
++ continue;
++#if HAVE_STRUCT_FDTAB
++ if (!fd.fd_dt
++ || kread((KA_T)fd.fd_dt, (char *)&dt, sizeof(dt)))
++ continue;
++#endif /* ! HAVE_STRUCT_FDTAB */
++ if (fd.fd_lastfile > NFILES(fd,dt))
+ continue;
+
+ #if defined(HASCWDINFO)
+@@ -278,14 +334,14 @@ gather_proc_info()
+ /*
+ * Read open file structure pointers.
+ */
+- if (!fd.fd_ofiles || (nf = fd.fd_nfiles) <= 0)
++ if (!OFILES(fd,dt) || (nf = NFILES(fd,dt)) <= 0)
+ continue;
+- nb = (MALLOC_S)(sizeof(struct file *) * nf);
++ nb = (MALLOC_S)(sizeof(FILESTRUCT *) * nf);
+ if (nb > ofbb) {
+ if (!ofb)
+- ofb = (struct file **)malloc(nb);
++ ofb = (FILESTRUCT **)malloc(nb);
+ else
+- ofb = (struct file **)realloc((MALLOC_P *)ofb, nb);
++ ofb = (FILESTRUCT **)realloc((MALLOC_P *)ofb, nb);
+ if (!ofb) {
+ (void) fprintf(stderr, "%s: PID %d, no file * space\n",
+ Pn, p->P_PID);
+@@ -293,7 +349,7 @@ gather_proc_info()
+ }
+ ofbb = nb;
+ }
+- if (kread((KA_T)fd.fd_ofiles, (char *)ofb, nb))
++ if (kread((KA_T)OFILES(fd,dt), (char *)ofb, nb))
+ continue;
+
+ #if defined(HASFSTRUCT)
+@@ -311,8 +367,10 @@ gather_proc_info()
+ }
+ pofb = nb;
+ }
++#if ! HAVE_STRUCT_FDFILE
+ if (!fd.fd_ofileflags || kread((KA_T)fd.fd_ofileflags, pof, nb))
+ zeromem(pof, nb);
++#endif /* ! HAVE_STRUCT_FDFILE */
+ }
+ #endif /* defined(HASFSTRUCT) */
+
+@@ -321,8 +379,20 @@ gather_proc_info()
+ */
+ for (i = 0; i < nf; i++) {
+ if (ofb[i]) {
++#if HAVE_STRUCT_FDFILE
++ struct fdfile fdf;
++ if (kread((KA_T)ofb[i], (char *)&fdf, sizeof(fdf)))
++ continue;
++ Cfp = fdf.ff_file;
++ if (Cfp == NULL)
++ continue;
++ if (pof)
++ pof[i] = fdf.ff_exclose;
++#else /* ! HAVE_STRUCT_FDFILE */
++ Cfp = ofb[i];
++#endif /* ! HAVE_STRUCT_FDFILE */
+ alloc_lfile(NULL, i);
+- process_file((KA_T)(Cfp = ofb[i]));
++ process_file((KA_T)Cfp);
+ if (Lf->sf) {
+
+ #if defined(HASFSTRUCT)
Home |
Main Index |
Thread Index |
Old Index