Subject: Re: pkg/10616: sparc/cpu.h includes non-installed kernel includes
To: Andrew Brown <atatat@atatdot.net>
From: Jaromír Doleček <dolecek@ibis.cz>
List: tech-kern
Date: 08/03/2000 23:05:44
Andrew Brown wrote:
> i was fiddling with lsof 4.51D (the mother of all kmem grovellers) and
> it needs it.  when it's processing a vnode, it looks at stuff in there
> to print out locks on file descriptors, if any.

What it exactly needs ? Does it need the contents of struct lockf ?
If it needs just stub
	struct lockf;
it should not include the <sys/lockf.h> header.

BTW, you might get away with defining _KERNEL and _LKM - the
"opt_*" are normally only included if _LKM is not defined.

> on the other hand...it only needs the forward struct declaration to
> get rid of the warning from the prototype for lf_advlock(), a function
> it will *never* call.  if the function prototypes were protected from

It could hardly do so - it's internal kernel function :)

> normal inclusion by a _KERNEL define wrapper, then i think the problem
> could be reduced.

Jaromir
-- 
Jaromir Dolecek <jdolecek@NetBSD.org>      http://www.ics.muni.cz/~dolecek/
@@@@  Wanna a real operating system ? Go and get NetBSD, damn!  @@@@