Subject: Re: lsof and struct bufq_state
To: Ron Roskens <>
From: Andrew Brown <>
List: current-users
Date: 09/11/2002 17:29:47
>I don't know if its "proper" for a user util to define _KERNEL, but since
>lsof is groveling around inside kernel space, it needs it more for all the
>types to be defined.

most utilities don't do it, and properly should not.  some, however,
do need to do it and it assumed that they know *exactly* what they are

>Change dlsof.h so that the code around "include <sys/buf.h>" looks like this:
># if   defined(NETBSDV)
>#  if  __NetBSD_Version__>=106050000
>#define        _KERNEL
>struct buf;    /* to satisfy a function prototype in buf.h */
>#  endif
>#include <sys/buf.h>
>#  if  __NetBSD_Version__>=106050000
>#undef _KERNEL
>#  endif
># endif        /* defined(NETBSDV) */

i have patch that does this ( modification to patch-ab for
the lsof pkg in pkgsrc) that i'll probably be comitting soon, however
i was waiting to discuss the issue with either (or both) of the person
who made the changes in question and the maintainer of lsof.

please stand by.  :)

|-----< "CODE WARRIOR" >-----|             * "ah!  i see you have the internet (Andrew Brown)                that goes *ping*!"       * "information is power -- share the wealth."