Subject: kernel build error: if_le_isa: incompat. pointer type
To: None <current-users@NetBSD.ORG>
From: Rick Byers <rickb@iaw.on.ca>
List: current-users
Date: 04/09/1998 13:57:57
Hi,
After yesterday's (and today's) sup, my kernel won't build.  I see le0 is
commented out of GENERIC, so this probably won't affect most people (it
builds fine without my network interface - but I need it).  I get:

cc  -O2 -Werror -Wall -Wmissing-prototypes -Wstrict-prototypes -I. -I../../../../arch -I../../../.. -nostdinc -DKTRACE -DSYSVMSG -DSYSVSEM -DSYSVSHM -DLKM -DDIAGNOSTIC -DDDB -DDDB_HISTORY_SIZE="0x64" -DCOMPAT_NOMID -DCOMPAT_09 -DCOMPAT_10 -DCOMPAT_11 -DCOMPAT_12 -DCOMPAT_13 -DCOMPAT_43 -DCOMPAT_386BSD_MBRPART -DCOMPAT_SVR4 -DCOMPAT_IBCS2 -DCOMPAT_LINUX -DCOMPAT_FREEBSD -DQUOTA -DNFSSERVER -DFIFO -DINET -DNETATALK -DMAXUSERS=32 -D_KERNEL  -Di386  -c ../../../../dev/isa/if_le_isa.c
cc1: warnings being treated as errors
../../../../dev/isa/if_le_isa.c:119: warning: initialization from incompatible pointer type
*** Error code 1

I'm not sure how far back this goes (havn't supped in a couple months).  

if_le_isa.c has the following at lines 115-120:
int le_isa_probe __P((struct device *, void *, void *));
void le_isa_attach __P((struct device *, struct device *, void *));

struct cfattach le_isa_ca = {
	sizeof(struct le_softc), le_isa_probe, le_isa_attach
};

In sys/device.h, cfattach is defined as:

#ifdef __BROKEN_INDIRECT_CONFIG
typedef int (*cfmatch_t) __P((struct device *, void *, void *));
typedef void (*cfscan_t) __P((struct device *, void *));
#else
typedef int (*cfmatch_t) __P((struct device *, struct cfdata *, void *));
#endif

struct cfattach {
	size_t	  ca_devsize;		/* size of dev data (for malloc) */
	cfmatch_t ca_match;		/* returns a match level */
	void	(*ca_attach) __P((struct device *, struct device *, void *));
	/* XXX should have detach */
};

Something needs to be changed here (related to BROKEN_INDIRECT_CONFIG?),
but I'm not sure exactly what.  I could guess, but I'd probably just break
something else - so please let me know what needs to be fixed...

Thanks,
	Rick

=========================================================================
Rick Byers                                      Internet Access Worldwide
rickb@iaw.on.ca                                		     System Admin
University of Waterloo, Computer Science                    (905)714-1400
http://www.iaw.on.ca/rickb/                         http://www.iaw.on.ca/