Re: 2.4.25-pre8: usb/gadget/file_storage.c doesn't compile with gcc 2.95 [patch]

From: Eyal Lebedinsky
Date: Fri Jan 30 2004 - 06:36:12 EST


Adrian Bunk wrote:
>
> On Thu, Jan 29, 2004 at 06:41:52PM -0200, Marcelo Tosatti wrote:
> >...
> > Summary of changes from v2.4.25-pre7 to v2.4.25-pre8
> > ============================================
> >...
> > David Brownell:
> >...
> > o USB gadget: add file_storage gadget driver [2/7]
> >...
>
> I'm getting the following compile error with gcc 2.95:
>
> <-- snip -->
>
> ...
> gcc-2.95 -D__KERNEL__
> -I/home/bunk/linux/kernel-2.4/linux-2.4.25-pre8-modular/include -Wall
> -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common
> -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=k6
> -DMODULE -DMODVERSIONS -include
> /home/bunk/linux/kernel-2.4/linux-2.4.25-pre8-modular/include/linux/modversions.h
> -nostdinc -iwithprefix include -DKBUILD_BASENAME=file_storage -c -o
> file_storage.o file_storage.c
> file_storage.c: In function `received_cbi_adsc':
> file_storage.c:1385: parse error before `;'
> file_storage.c: In function `check_parameters':
> file_storage.c:3767: parse error before `;'
> file_storage.c: In function `fsg_bind':
> file_storage.c:3912: parse error before `;'
> make[2]: *** [file_storage.o] Error 1
> make[2]: Leaving directory
> `/home/bunk/linux/kernel-2.4/linux-2.4.25-pre8-modular/drivers/usb/gadget'

One way to get past this problem, at least for Debian (gcc 2.95.4).

--
Eyal Lebedinsky (eyal@xxxxxxxxxxxxxx) <http://samba.org/eyal/>--- linux/drivers/usb/gadget/file_storage.c.orig Fri Jan 30 20:35:35 2004
+++ linux/drivers/usb/gadget/file_storage.c Fri Jan 30 21:13:10 2004
@@ -3909,7 +3909,7 @@
goto out;
fsg->thread_pid = rc;

- INFO(fsg, DRIVER_DESC ", version: " DRIVER_VERSION "\n");
+ INFO(fsg, DRIVER_DESC ", version: " DRIVER_VERSION "\n", "");
INFO(fsg, "Number of LUNs=%d\n", fsg->nluns);

pathbuf = kmalloc(PATH_MAX, GFP_KERNEL);