Commit:     b6ccc67d8e42e38936df330b26ee6d022dda8a64
Parent:     d007da1fa6f0ad5e01ceae4a1f60cdbb23ecd706
Author:     Mikael Pettersson <[EMAIL PROTECTED]>
AuthorDate: Sat May 19 13:55:25 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Sat May 19 13:55:25 2007 -0700

    [NET]: Fix net/core/skbuff.c gcc-3.2.3 compilation error
    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 
-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" 
-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 <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
 net/core/skbuff.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 1422573..7c6a34e 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -644,11 +644,10 @@ int pskb_expand_head(struct sk_buff *skb, int nhead, int 
        /* Copy only real data... and, alas, header. This should be
         * optimized for the cases when header is void. */
-       memcpy(data + nhead, skb->head,
-               skb->tail);
+       memcpy(data + nhead, skb->head, skb->tail);
-               skb->tail - skb->head);
+       memcpy(data + nhead, skb->head, skb->tail - skb->head);
        memcpy(data + size, skb_end_pointer(skb),
               sizeof(struct skb_shared_info));
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to