Subject: kernel-compile on i386 failed
To: None <current-users@netbsd.org>
From: None <ks@ub.uni-mainz.de>
List: current-users
Date: 01/23/2001 15:09:42
Hi,

trying to compile a -current kernel for a peecee w/ a cyclades cy
board (should become a console-server for the suns here) I got the
following:

cc  -O2 -Werror -Wall -Wmissing-prototypes -Wstrict-prototypes  -Wpointer-arith -Wno-uninitialized -Wno-main -I. -I/usr/src/sys/arch -I/usr/src/sys -nostdinc -DDIAGNOSTIC -DMSGBUFSIZE="0x4000" -DMAXUSERS=32 -D_KERNEL -Di386  -c /usr/src/sys/dev/ic/cy.c
/usr/src/sys/dev/ic/cy.c: In function `cy_attach':
/usr/src/sys/dev/ic/cy.c:167: argument `parent' doesn't match prototype
/usr/src/sys/dev/ic/cyvar.h:96: prototype declaration
/usr/src/sys/dev/ic/cy.c:167: number of arguments doesn't match prototype
/usr/src/sys/dev/ic/cyvar.h:96: prototype declaration
cc1: warnings being treated as errors
/usr/src/sys/dev/ic/cy.c: In function `cyopen':
/usr/src/sys/dev/ic/cy.c:232: warning: implicit declaration of function `CY_PORT'
/usr/src/sys/dev/ic/cy.c:243: warning: implicit declaration of function `CY_CARD'
/usr/src/sys/dev/ic/cy.c:328: warning: implicit declaration of function `CY_DIALOUT'
/usr/src/sys/dev/ic/cy.c: In function `cy_poll':
/usr/src/sys/dev/ic/cy.c:1011: warning: implicit declaration of function `CY_DIALIN'
*** Error code 1

Stop.


To get rid of the wrong prototype I tried the following:

--- /usr/src/sys/dev/ic/cy.c.orig    Tue Jan 23 12:41:39 2001
+++ /usr/src/sys/dev/ic/cy.c   Tue Jan 23 14:55:20 2001
@@ -161,12 +161,10 @@
 }
 
 void
-cy_attach(parent, self, aux)
-       struct device  *parent, *self;
-       void *aux;
+cy_attach(sc)
+       struct cy_softc *sc;
 {
        int  port, cy_chip, num_chips, cdu, chip;
-       struct cy_softc *sc = (void *) self;
        int cy_clock;
 
        num_chips = sc->sc_nchips;

The macros CY_{PORT,CARD,DIAL{IN,OUT}} used in cyopen and cy_poll
somehow disappeared from /usr/src/sys/dev/ic/cyvar.h...

Not shure what to do now...

    Kurt