pkgsrc/sysutils/lsof/patches/patch-af

97 lines
2.9 KiB
Text
Raw Normal View History

$NetBSD: patch-af,v 1.15 2017/08/30 10:41:24 kamil Exp $
--- dialects/n+obsd/dlsof.h.orig 2006-03-28 21:54:15.000000000 +0000
2007-11-21 12:01:55 +01:00
+++ dialects/n+obsd/dlsof.h
@@ -95,6 +95,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 <sys/mount.h>
# if (defined(OPENBSDV) && OPENBSDV>=3030) \
@@ -106,10 +110,6 @@ struct uio; /* dummy for function protot
#include <rpc/types.h>
#include <sys/protosw.h>
-# if defined(NETBSDV) && NETBSDV>=1003000
-#define sockproto NETBSD_sockproto
-# endif /* defined(NETBSDV) && NETBSDV>=1003000 */
-
#include <sys/socket.h>
# if defined(HASMSDOSFS)
2007-11-21 12:01:55 +01:00
@@ -161,6 +161,7 @@ struct nameidata; /* to satisfy a functi
2007-05-06 23:41:30 +02:00
#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>
2007-11-21 12:01:55 +01:00
@@ -170,7 +171,6 @@ struct nameidata; /* to satisfy a functi
2007-05-06 23:41:30 +02:00
#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>
2007-11-21 12:01:55 +01:00
@@ -264,6 +264,9 @@ struct sockproto {
#undef KERNEL
#include <ufs/mfs/mfsnode.h>
+# if defined(HASTMPFS)
+#include <fs/tmpfs/tmpfs.h>
+# endif /* defined(HASTMPFS) */
# if defined(HASNFSPROTO)
#include <nfs/rpcv2.h>
@@ -370,7 +373,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 +384,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 <machine/reg.h>
@@ -489,7 +494,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 */
@@ -581,4 +591,12 @@ struct sfile {
2007-11-21 12:01:55 +01:00
# 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
2007-12-17 12:13:40 +01:00
+#define NCACHE_VROOT VROOT
2007-11-21 12:01:55 +01:00
+#endif /* VV_ROOT */
+
#endif /* NETBSD_LSOF_H */