Skip to content

Commit

Permalink
lsof: fix build on -current
Browse files Browse the repository at this point in the history
  • Loading branch information
tnn2 committed Mar 5, 2020
1 parent bca3303 commit c1cc8f9
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 25 deletions.
6 changes: 3 additions & 3 deletions sysutils/lsof/distinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.91 2019/01/06 16:36:00 tnn Exp $
$NetBSD: distinfo,v 1.92 2020/03/05 20:49:22 tnn Exp $

SHA1 (lsof_4.91.tar.bz2) = da6f9883d00f200671f6e47cf838bb9b6b9c6f01
RMD160 (lsof_4.91.tar.bz2) = 5f7be9a860f30b66e247e0405657a69dd044e245
Expand All @@ -9,7 +9,7 @@ SHA1 (patch-ab) = 1501d8b0e6fd2c61949ba0d447c7b726655725c4
SHA1 (patch-ac) = dac0fcdfee97d42c8f23684a4321519b9f8698d9
SHA1 (patch-ad) = 7f639e8832c2da8e498c33a38ecbc7b3d3a7430a
SHA1 (patch-ae) = 3f4a7ce54c0646941fd86400f91a2d17e9d2354a
SHA1 (patch-af) = 2e5dced3772fe33412f4cf782d21fab1c4373b38
SHA1 (patch-ag) = bd146026dff5a383b1a53e1bc9cf68302f742575
SHA1 (patch-af) = 4106e4cdf01587d6f6a080ddb5bb0261729bcede
SHA1 (patch-ag) = ced30f63961268a6c76bcc1d22a2eb9e1f750480
SHA1 (patch-ah) = 2de22b9a3733f958298af5e33b66c0653c320f59
SHA1 (patch-dialects_n+obsd_dnode1.c) = dc8c766760aca4eb2e7d7af3944260dd49795c09
30 changes: 19 additions & 11 deletions sysutils/lsof/patches/patch-af
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
$NetBSD: patch-af,v 1.16 2019/01/06 16:36:00 tnn Exp $
$NetBSD: patch-af,v 1.17 2020/03/05 20:49:22 tnn Exp $

--- dialects/n+obsd/dlsof.h.orig 2006-03-28 21:54:15.000000000 +0000
+++ dialects/n+obsd/dlsof.h
@@ -95,6 +95,10 @@ struct uio; /* dummy for function protot
@@ -46,6 +46,7 @@
#include <signal.h>
#include <string.h>
#include <unistd.h>
+#include <sys/ptrace.h> /* pulled in by procfs.h, but needs to be pulled in before _KERNEL is defined */

# if defined(HASGETBOOTFILE)
#include <util.h>
@@ -95,6 +96,10 @@ struct uio; /* dummy for function protot
# endif /* (defined(OPENBSDV) && OPENBSDV<3030)
|| (defined(NETBSDV) && __NetBSD_Version__>=106060000) */

Expand All @@ -13,7 +21,7 @@ $NetBSD: patch-af,v 1.16 2019/01/06 16:36:00 tnn Exp $
#include <sys/mount.h>

# if (defined(OPENBSDV) && OPENBSDV>=3030) \
@@ -106,10 +110,6 @@ struct uio; /* dummy for function protot
@@ -106,10 +111,6 @@ struct uio; /* dummy for function protot
#include <rpc/types.h>
#include <sys/protosw.h>

Expand All @@ -24,7 +32,7 @@ $NetBSD: patch-af,v 1.16 2019/01/06 16:36:00 tnn Exp $
#include <sys/socket.h>

# if defined(HASMSDOSFS)
@@ -147,6 +147,9 @@ struct uio; /* dummy for function protot
@@ -147,6 +148,9 @@ struct uio; /* dummy for function protot
|| (defined(NETBSDV) && __NetBSD_Version__<106060000) */

#define _KERNEL
Expand All @@ -34,23 +42,23 @@ $NetBSD: patch-af,v 1.16 2019/01/06 16:36:00 tnn Exp $
struct nameidata; /* to satisfy a function prototype in msdosfsmount.h */
#include <msdosfs/msdosfsmount.h>
#undef _KERNEL
@@ -161,6 +164,7 @@ struct nameidata; /* to satisfy a functi
@@ -161,6 +165,7 @@ struct nameidata; /* to satisfy a functi
#include <sys/socketvar.h>
#include <sys/un.h>
#include <sys/unpcb.h>
+#include <net/route.h>
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
@@ -170,7 +174,6 @@ struct nameidata; /* to satisfy a functi
@@ -170,7 +175,6 @@ struct nameidata; /* to satisfy a functi
#include <netinet6/in6_pcb.h>
# endif /* defined(HASIPv6) && defined(NETBSDV) && !defined(HASINRIAIPv6) */

-#include <net/route.h>
#include <netinet/in_pcb.h>
#include <netinet/ip_var.h>
#include <netinet/tcp.h>
@@ -264,6 +267,9 @@ struct sockproto {
@@ -264,6 +268,9 @@ struct sockproto {

#undef KERNEL
#include <ufs/mfs/mfsnode.h>
Expand All @@ -60,15 +68,15 @@ $NetBSD: patch-af,v 1.16 2019/01/06 16:36:00 tnn Exp $

# if defined(HASNFSPROTO)
#include <nfs/rpcv2.h>
@@ -370,7 +376,6 @@ struct sockproto {
@@ -370,7 +377,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 +387,9 @@ struct sockproto {
@@ -382,6 +388,9 @@ struct sockproto {
#define Pmap PFSmap
#define Pmaps PFSmaps
# endif /* NETBSDV>=1006000 */
Expand All @@ -78,7 +86,7 @@ $NetBSD: patch-af,v 1.16 2019/01/06 16:36:00 tnn Exp $
# endif /* defined(NetBSDV) */
# endif /* defined(HASPROCFS_PFSROOT) */
#include <machine/reg.h>
@@ -489,7 +497,12 @@ extern KA_T Kpa;
@@ -489,7 +498,12 @@ extern KA_T Kpa;
struct l_vfs {
KA_T addr; /* kernel address */
fsid_t fsid; /* file system ID */
Expand All @@ -91,7 +99,7 @@ $NetBSD: patch-af,v 1.16 2019/01/06 16:36:00 tnn Exp $
char *dir; /* mounted directory */
char *fsname; /* file system name */
struct l_vfs *next; /* forward link */
@@ -581,4 +594,12 @@ struct sfile {
@@ -581,4 +595,12 @@ struct sfile {
# endif /* defined(HASNCVPID) */
# endif /* defined(HASNCACHE) */

Expand Down
32 changes: 21 additions & 11 deletions sysutils/lsof/patches/patch-ag
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
$NetBSD: patch-ag,v 1.9 2017/06/22 20:48:04 tnn Exp $
$NetBSD: patch-ag,v 1.10 2020/03/05 20:49:22 tnn Exp $

--- Configure.orig 2015-07-07 20:17:04.000000000 +0000
--- Configure.orig 2018-02-14 14:18:55.000000000 +0000
+++ Configure
@@ -3013,32 +3013,66 @@ return(0); }
@@ -3077,32 +3077,66 @@ return(0); }
echo "!!!WARNING!!! Unsupported NetBSD version: $LSOF_VSTR"
echo "!!!WARNING!!! Configuring for NetBSD 3.0"
;;
Expand Down Expand Up @@ -87,19 +87,18 @@ $NetBSD: patch-ag,v 1.9 2017/06/22 20:48:04 tnn Exp $
then
grep -q getbootfile ${LSOF_INCLUDE}/util.h
if test $? -eq 0 # {
@@ -3437,6 +3471,7 @@ return(0); }
@@ -3501,6 +3535,7 @@ return(0); }
fi # }
LSOF_TMP2="sys/vnode.h"
LSOF_NBSD_PTYFS=0
+ LSOF_NBSD_TMPFS=0
if test -r ${LSOF_INCLUDE}/$LSOF_TMP2 # {
then
LSOF_TMP3="${LSOF_INCLUDE}/$LSOF_TMP2"
@@ -3514,7 +3549,25 @@ return(0); }
@@ -3578,16 +3613,29 @@ return(0); }
fi # }
fi # }
fi # }
- if test "X$NETBSD_UVM" = "X" # {
+ grep -q VT_TMPFS $LSOF_TMP3
+ if test $? -eq 0 # {
+ then
Expand All @@ -118,11 +117,22 @@ $NetBSD: patch-ag,v 1.9 2017/06/22 20:48:04 tnn Exp $
+ fi # }
+ fi # }
+ fi # }
+ if test "X$NETBSD_UVM" = "X" # {
if test "X$NETBSD_UVM" = "X" # {
then
grep -q UVM $LSOF_TMP3
if test $? -ne 0 # {
@@ -3799,6 +3852,28 @@ return(0); }
- grep -q UVM $LSOF_TMP3
- if test $? -ne 0 # {
+ if test -r ${LSOF_INCLUDE}/uvm # {
then
- egrep -q "v_uvm;|v_uobj;" $LSOF_TMP3
- if test $? -eq 0 # {
- then
- NETBSD_UVM="Y"
- fi # }
+ NETBSD_UVM="Y"
fi # }
fi # }
fi # }
@@ -3863,6 +3911,28 @@ return(0); }
LSOF_CFGF="$LSOF_CFGF -I`pwd`/dialects/n+obsd/include"
fi # }
fi # }
Expand Down Expand Up @@ -151,7 +161,7 @@ $NetBSD: patch-ag,v 1.9 2017/06/22 20:48:04 tnn Exp $
LSOF_CFGL="$LSOF_CFGL -lkvm"
LSOF_DIALECT_DIR=n+obsd
;;
@@ -5535,7 +5610,7 @@ fi # }
@@ -5607,7 +5677,7 @@ fi # }
echo "" >> $LSOF_MKFC
if test "X$LSOF_DEBUG" = "X" # {
then
Expand Down

0 comments on commit c1cc8f9

Please sign in to comment.