Subject: kern/9636: The XFree86 aperature driver won't build
To: None <>
From: None <>
List: netbsd-bugs
Date: 03/18/2000 01:57:03
>Number:         9636
>Category:       kern
>Synopsis:       The XFree86 aperature driver won't build
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Mar 18 01:57:00 2000
>Originator:     Dave Sainty
Dynamic Technology Services and Products Ltd (NZ)
>Release:        Recent NetBSD-current
System: NetBSD 1.4R NetBSD 1.4R (TEQUILA) #3: Wed Feb 16 20:01:31 NZDT 2000 i386

	The aperature driver includes sys/systm.h with -D_LKM -D_KERNEL.
	systm.h includes lib/libkern/libkern.h if _KERNEL is defined.
	sh /usr/xsrc/xc/programs/Xserver/hw/xfree86/etc/apNetBSD.shar
	lkm's are unfamiliar ground, but I think the correct fix to the header
	(but not enough to compile the driver yet) is:

--- src/sys/sys/systm.h.orig    Sat Mar  4 16:14:49 2000
+++ src/sys/sys/systm.h Sat Mar 18 21:54:53 2000
@@ -306,7 +306,7 @@
 void   kmstartup __P((void));
-#ifdef _KERNEL
+#if defined(_KERNEL) && !defined(_LKM)
 #include <lib/libkern/libkern.h>