pkgsrc/sysutils/lsof/patches/patch-af
2007-12-17 11:13:40 +00:00

56 lines
1.7 KiB
Text

$NetBSD: patch-af,v 1.13 2007/12/17 11:13:41 tron Exp $
--- dialects/n+obsd/dlsof.h.orig 2006-03-28 23:54:15.000000000 +0200
+++ dialects/n+obsd/dlsof.h
@@ -161,6 +161,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 +171,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 +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>
@@ -489,7 +492,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 +589,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 */