Subject: Re: kernel build problem (and workaround)
To: None <manu@netbsd.org, augustss@netbsd.org>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: port-macppc
Date: 10/21/2001 22:55:12
In article <1f1mj0w.izdjhidpsy3sM%manu@netbsd.org>
manu@netbsd.org wrote:

> I had trouble building the kernel this weekend: it complained at link
> time about wsmouse_add_mux and another wscons related symbol being
> undefined

This is because these functions in wsmouse.c are disabled
if NWSMUX == 0, but wsmux.c is compiled/linked and
wsmuxdoioctl() in it calls them even if NWSMUX == 0.

Is the attached patch correct?
---
Izumi Tsutsui
tsutsui@ceres.dti.ne.jp

Index: wsmux.c
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/wscons/wsmux.c,v
retrieving revision 1.12
diff -u -r1.12 wsmux.c
--- wsmux.c	2001/10/13 20:03:38	1.12
+++ wsmux.c	2001/10/21 13:52:51
@@ -541,7 +541,7 @@
 	case WSMUX_ADD_DEVICE:
 #define d ((struct wsmux_device *)data)
 		switch (d->type) {
-#if NWSMOUSE > 0
+#if NWSMOUSE > 0 && NWSMUX > 0
 		case WSMUX_MOUSE:
 			return (wsmouse_add_mux(d->idx, sc));
 #endif
@@ -558,7 +558,7 @@
 		}
 	case WSMUX_REMOVE_DEVICE:
 		switch (d->type) {
-#if NWSMOUSE > 0
+#if NWSMOUSE > 0 && NWSMUX > 0
 		case WSMUX_MOUSE:
 			return (wsmouse_rem_mux(d->idx, sc));
 #endif