* [PATCH 2.6.22-rc1] net/core/skbuff.c gcc-3.2.3 compilation error
@ 2007-05-18 11:49 Mikael Pettersson
2007-05-19 20:55 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Mikael Pettersson @ 2007-05-18 11:49 UTC (permalink / raw)
To: linux-kernel
[Resend. First message reached netdev but not linux-kernel due to Cc: typo]
Compiling 2.6.22-rc1 with gcc-3.2.3 for i486 fails with:
gcc -m32 -Wp,-MD,net/core/.skbuff.o.d -nostdinc -isystem /home/mikpe/pkgs/linux-x86/gnu/lib/gcc-lib/i486-pc-linux-gnu/3.2.3/include -D__KERNEL__ -Iinclude -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -O2 -pipe -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=4 -march=i486 -ffreestanding -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -Iinclude/asm-i386/mach-default -fomit-frame-pointer -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(skbuff)" -D"KBUILD_MODNAME=KBUILD_STR(skbuff)" -c -o net/core/skbuff.o net/core/skbuff.c
net/core/skbuff.c:648:1: directives may not be used inside a macro argument
net/core/skbuff.c:647:39: unterminated argument list invoking macro "memcpy"
net/core/skbuff.c: In function `pskb_expand_head':
net/core/skbuff.c:651: `memcpy' undeclared (first use in this function)
net/core/skbuff.c:651: (Each undeclared identifier is reported only once
net/core/skbuff.c:651: for each function it appears in.)
net/core/skbuff.c:651: syntax error before "skb"
make[2]: *** [net/core/skbuff.o] Error 1
make[1]: *** [net/core] Error 2
make: *** [net] Error 2
The patch below implements a simple workaround which is to
clone the offending memcpy() call and specialise it for the
two different scenarios.
Other workarounds are of course possible: e.g. bind the varying
parameter in a local variable, or use a macro or inline function
to perform the varying computation.
Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
--- linux-2.6.22-rc1/net/core/skbuff.c.~1~ 2007-05-17 21:34:18.000000000 +0200
+++ linux-2.6.22-rc1/net/core/skbuff.c 2007-05-18 01:28:16.000000000 +0200
@@ -644,11 +644,10 @@
/* Copy only real data... and, alas, header. This should be
* optimized for the cases when header is void. */
- memcpy(data + nhead, skb->head,
#ifdef NET_SKBUFF_DATA_USES_OFFSET
- skb->tail);
+ memcpy(data + nhead, skb->head, skb->tail);
#else
- skb->tail - skb->head);
+ memcpy(data + nhead, skb->head, skb->tail - skb->head);
#endif
memcpy(data + size, skb_end_pointer(skb),
sizeof(struct skb_shared_info));
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 2.6.22-rc1] net/core/skbuff.c gcc-3.2.3 compilation error
2007-05-18 11:49 [PATCH 2.6.22-rc1] net/core/skbuff.c gcc-3.2.3 compilation error Mikael Pettersson
@ 2007-05-19 20:55 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2007-05-19 20:55 UTC (permalink / raw)
To: mikpe; +Cc: linux-kernel
From: Mikael Pettersson <mikpe@it.uu.se>
Date: Fri, 18 May 2007 13:49:59 +0200 (MEST)
> [Resend. First message reached netdev but not linux-kernel due to Cc: typo]
>
> Compiling 2.6.22-rc1 with gcc-3.2.3 for i486 fails with:
...
> The patch below implements a simple workaround which is to
> clone the offending memcpy() call and specialise it for the
> two different scenarios.
>
> Other workarounds are of course possible: e.g. bind the varying
> parameter in a local variable, or use a macro or inline function
> to perform the varying computation.
>
> Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Applied, thanks Mikael.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-05-19 20:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-18 11:49 [PATCH 2.6.22-rc1] net/core/skbuff.c gcc-3.2.3 compilation error Mikael Pettersson
2007-05-19 20:55 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®