compile time bug report
Stan Tazuma 425-865-3609
skt@redwood.rt.cs.boeing.com
Tue Dec 15 18:54:36 1998
Platform: RedHat Linux 5.1
I just downloaded the latest 3c59x.c driver and got errors
when trying to compile it. Here's the version info from 3c59x.c:
static char *version =
"3c59x.c:v0.99H 11/17/98 Donald Becker http://cesdis.gsfc.nasa.gov/linux/drivers/vortex.html\n";
These were the error messages:
$ gcc -DMODULE -D__KERNEL__ -Wall -Wstrict-prototypes -O6 -c 3c59x.c -DMODVERSIONS
3c59x.c:94: parse error before `<'
3c59x.c: In function `vortex_probe1':
3c59x.c:879: stray '\' in program
3c59x.c:879: parse error before `;'
3c59x.c:926: `mii_preamble_required' undeclared (first use this function)
3c59x.c:926: (Each undeclared identifier is reported only once
3c59x.c:926: for each function it appears in.)
3c59x.c: In function `mdio_read':
3c59x.c:2047: `mii_preamble_required' undeclared (first use this function)
3c59x.c: In function `mdio_write':
3c59x.c:2079: `mii_preamble_required' undeclared (first use this function)
gcc -v says:
-----------------------------------------------------------------------
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/specs
gcc version 2.7.2.3
-----------------------------------------------------------------------
To fix it, I changed these lines:
-----------------------------------------------------------------------
#define ioremap(a,b) \
(((a)<0x100000) ? (void *)((u_long)(a)) : vremap(a,b))
#define iounmap(v) \
do { if ((u_long)(v) > 0x100000) vfree(v); } while (0)
-----------------------------------------------------------------------
to these:
-----------------------------------------------------------------------
#define ioremap(a,b) (((a)<0x100000) ? (void *)((u_long)(a)) : vremap(a,b))
#define iounmap(v) do { if ((u_long)(v) > 0x100000) vfree(v); } while (0)
-----------------------------------------------------------------------
Program then compiles, and works, fine.
Thanks for updating the driver (with RedHat Linux 5.1 I was able
to install Linux over the network, via NFS, but after installation
networking did not work at all. After installing your new driver
it works fine now (it's a 10/100 on-board 3Com network chip in
a Dell GX1 Pentium II 350 MHz)).
Thanks,
Stan Tazuma
skt@redwood.rt.cs.boeing.com