Subject: pkg/34119: pkg lsof needs adjustment for include requirements
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <gcw@primenet.com.au>
List: pkgsrc-bugs
Date: 08/01/2006 03:45:00
>Number: 34119
>Category: pkg
>Synopsis: pkg lsof doesn't need _KERNEL for newer <sys/mount.h>
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Aug 01 03:45:00 +0000 2006
>Originator: Geoff C. Wing
>Release: NetBSD 3.99.24
>Organization:
>Environment:
System: NetBSD g.primenet.com.au 3.99.24 NetBSD 3.99.24 (G) #0: Tue Aug 1 08:52:17 EST 2006 gcw@g.primenet.com.au:/usr/netbsd/src/sys/arch/i386/compile/G i386
Architecture: i386
Machine: i386
>Description:
At one stage lsof needed to define _KERNEL to handle <sys/mount.h>
It doesn't seem to need to now - and fails on build if defined due
to recent fhandle_t stuff. The last version it would build
on is probably 399002300 but may not need it even at versions before
that.
>How-To-Repeat:
Build failure.
>Fix:
Replace sysutils/lsof/patches/patch-ac with
--- dialects/n+obsd/dlsof.h.orig 2005-08-09 05:53:27.000000000 +1000
+++ dialects/n+obsd/dlsof.h 2006-08-01 13:36:00.000000000 +1000
@@ -69,7 +69,7 @@
# endif /* (defined(OPENBSDV) && OPENBSDV>=3030)
|| (defined(NETBSDV) && __NetBSD_Version__>=106060000) */
-# if defined(NETBSDV)
+# if defined(NETBSDV) && __NetBSD_Version__<399001100
#include <sys/buf.h>
# endif /* defined(NETBSDV) */
@@ -83,18 +83,22 @@
#define m_stat mnt_stat
# if (defined(OPENBSDV) && OPENBSDV>=3030) \
- || (defined(NETBSDV) && __NetBSD_Version__>=106060000)
+ || (defined(NETBSDV) \
+ && __NetBSD_Version__>=106060000 && __NetBSD_Version__<=399002300)
#define _KERNEL
# endif /* (defined(OPENBSDV) && OPENBSDV<3030)
- || (defined(NETBSDV) && __NetBSD_Version__>=106060000) */
+ || (defined(NETBSDV)
+ && __NetBSD_Version__>=106060000 && __NetBSD_Version__<=399002300) */
#include <sys/mount.h>
# if (defined(OPENBSDV) && OPENBSDV>=3030) \
- || (defined(NETBSDV) && __NetBSD_Version__>=106060000)
+ || (defined(NETBSDV) \
+ && __NetBSD_Version__>=106060000 && __NetBSD_Version__<=399002300)
#undef _KERNEL
# endif /* (defined(OPENBSDV) && OPENBSDV>=3030)
- || (defined(NETBSDV) && __NetBSD_Version__>=106060000) */
+ || (defined(NETBSDV)
+ && __NetBSD_Version__>=106060000 && __NetBSD_Version__<=399002300) */
#include <rpc/types.h>
#include <sys/protosw.h>