Re: [PATCH] Re: 2.4.8-pre1 build error in drivers/parport/parport_pc.c

From: Steven Cole (elenstev@mesatop.com)
Date: Fri Jul 27 2001 - 13:04:37 EST


On Friday 27 July 2001 02:12, Robert Schiele wrote:
> On Thu, Jul 26, 2001 at 07:53:11PM -0600, Steven Cole wrote:
> > I got the following errors building 2.4.8-pre1.
> >
> > parport_pc.c:257: redefinition of `parport_pc_write_data'
> > /usr/src/linux-2.4.8-pre1/include/linux/parport_pc.h:45:
> > `parport_pc_write_data' previously defined here parport_pc.c:262:
> > redefinition of `parport_pc_read_data'
> > /usr/src/linux-2.4.8-pre1/include/linux/parport_pc.h:53:
> > `parport_pc_read_data' previously defined here ...
> > make[3]: *** [parport_pc.o] Error 1
> > make[3]: Leaving directory `/usr/src/linux-2.4.8-pre1/drivers/parport'
>
> Hmm, these functions are multiply defined, namely in the c source and
> in it's header file. I see no reason why someone should do this. The
> problem was hidden in older kernel releases by the fact that these
> functions were declared "extern __inline__" which is absolutely
> nonsense in my opinion. So the solution should be to just remove these
> inline functions from the c source file, which can be done with the
> following simple and stupid patch.
>
> This should be the correct solution, or did I miss the vital point?
>
> Robert

Your patch works for me. Thank you. I can now print from my parallel port
printer using 2.4.8-pre1. FWIW, here is my gcc version:

[steven@localhost steven]$ gcc -v
Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux/2.96/specs
gcc version 2.96 20000731 (Linux-Mandrake 8.0 2.96-0.47mdk)

Steven
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jul 31 2001 - 21:00:34 EST