Subject: kern/9636: The XFree86 aperature driver won't build
To: None <gnats-bugs@gnats.netbsd.org>
From: None <dave@dtsp.co.nz>
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
>Last-Modified:
>Originator:     Dave Sainty
>Organization:
Dynamic Technology Services and Products Ltd (NZ)
>Release:        Recent NetBSD-current
>Environment:
System: NetBSD tequila.dave.dtsp.co.nz 1.4R NetBSD 1.4R (TEQUILA) #3: Wed Feb 16 20:01:31 NZDT 2000 dave@tequila.dave.dtsp.co.nz:/vol/tequila/userB/u2/NetBSD-current/src/sys/arch/i386/compile/TEQUILA i386


>Description:
	The aperature driver includes sys/systm.h with -D_LKM -D_KERNEL.
	systm.h includes lib/libkern/libkern.h if _KERNEL is defined.
>How-To-Repeat:
	sh /usr/xsrc/xc/programs/Xserver/hw/xfree86/etc/apNetBSD.shar
	make
>Fix:
	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));
 #endif
 
-#ifdef _KERNEL
+#if defined(_KERNEL) && !defined(_LKM)
 #include <lib/libkern/libkern.h>
 #endif
 
>Audit-Trail:
>Unformatted: