Re: linux 3.2.41-2 FTBFS
On Mon, Apr 1, 2013 at 9:07 PM, Ben Hutchings <ben@decadent.org.uk> wrote:
> On Mon, 2013-04-01 at 18:37 +0000, Thorsten Glaser wrote:
>> the latest upload FTBFS on m68k:
>>
>> CC [M] drivers/hid/hid-microsoft.o
>> /tmp/buildd/linux-3.2.41/drivers/hid/hid-microsoft.c: In function 'ms_report_fixup':
>> /tmp/buildd/linux-3.2.41/drivers/hid/hid-microsoft.c:52:18: error: macro "memcmp" passed 6 arguments, but takes just 3
>> /tmp/buildd/linux-3.2.41/drivers/hid/hid-microsoft.c:51:5: error: 'memcmp' undeclared (first use in this function)
>> /tmp/buildd/linux-3.2.41/drivers/hid/hid-microsoft.c:51:5: note: each undeclared identifier is reported only once for each function it appears in
>> make[7]: *** [drivers/hid/hid-microsoft.o] Error 1
>>
>> 49 /* the same as above (s/usage/physical/) */
>> 50 if ((quirks & MS_RDESC_3K) && *rsize == 106 &&
>> 51 !memcmp((char []){ 0x19, 0x00, 0x29, 0xff },
>> 52 &rdesc[94], 4)) {
>> 53 rdesc[94] = 0x35;
>> 54 rdesc[96] = 0x45;
>> 55 }
>>
>> I asked waldi in IRC whether this was known, and he said it
>> built on other arches, so maybe m68k is the only one to use
>> a macro; he suggested to put it upstream, and, well, upstream
>> for Linux 3.2 stable series is you ;-)
>
> This is fugly code, but m68k's string library is weird and needs fixing.
> Geert found another example of that recently:
> <http://article.gmane.org/gmane.linux.kernel.next/26701>.
I'll submit a patch to use -ffreestanding soon...
But that doesn't solve this issue.
BTW, on x86-32 memcmp() is also a macro, but there it works as it's
a less safe macro.
> Anyway: the basic rule for stable bug fixes is that the bug must be
> fixed (or never introduced) in mainline first. So check mainline first.
commit 6b90466cfec2a2fe027187d675d8d14217c12d82
Author: Jiri Slaby <jslaby@suse.cz>
Date: Mon Nov 12 10:16:09 2012 +0100
HID: microsoft: do not use compound literal - fix build
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Reply to: