Subject: Including sys/systm.h in lkms
To: None <tech-kern@NetBSD.ORG>
From: John Birrell <jb@cimlogic.com.au>
List: tech-kern
Date: 11/28/1996 18:01:19
G'day,

When compiling a custom lkm (for digital I/O), I'm need to include
sys/systm.h because sys/lkm.h requires it. I need to define _KERNEL.
And sys/systm.h #includes <lib/libkern/libkern.h> which doesn't get
installed below /usr/include.

I first started doing this on a system that didn't have sources, so
it wasn't just a matter of -I/usr/src/sys or -I/sys. I had to go get
the source for /usr/src/sys/lib/libkern/libkern.h. This appears
broken IMHO. I think I should be able to compile lkms on an installed
system. A send-pr?

Another thing that's a bit sub-optimal is that the function prototypes
for lkmexists and lkmdispatch are only in /usr/src/sys/kern/kern_lkm.c.
I need to call them. Don't they belong in sys/lkm.h? Another send-pr?


-- 
John Birrell                                CIMlogic Pty Ltd
jb@cimlogic.com.au                          119 Cecil Street
Ph  +61  3 9690 6900                        South Melbourne Vic 3205
Fax +61  3 9690 6650                        Australia
Mob +61 18  353  137