Skip to contentSkip to conversation

linux-2.6-hg tree: hypercall.h:252: error: previous implicit declaration of ‘memcpy’ was here

DISCUSSION Hans-Christian Armingeon 2 participants 2 messages May 5, 2006 – May 8, 2006

lore
Share & tools
lore
#0 lore raw

Hi,

the current hg tree doesn't compile for me.

any ideas? I'm on amd64.

Thanks in advance,

Johnny

CC arch/x86_64/kernel/asm-offsets.s
In file included from include/asm-i386/mach-xen/asm/hypervisor.h:111,

                 from include/asm/mach-xen/asm/hypervisor.h:2,
                 from include/asm/mach-xen/asm/system.h:8,
                 from include/linux/spinlock.h:57,
                 from include/linux/capability.h:45,
                 from include/linux/sched.h:7,
                 from arch/x86_64/kernel/asm-offsets.c:7:
include/asm/mach-xen/asm/hypercall.h: In function ‘HYPERVISOR_event_channel_op’:
include/asm/mach-xen/asm/hypercall.h:252: warning: implicit declaration of function ‘memcpy’
  GEN     include/asm-x86_64/asm-offsets.h
  CHK     include/linux/compile.h
  CC      init/main.o
  HOSTCC  usr/gen_init_cpio
In file included from include/asm-i386/mach-xen/asm/hypervisor.h:111,
                 from include/asm/mach-xen/asm/hypervisor.h:2,
                 from include/asm/mach-xen/asm/system.h:8,
                 from include/linux/spinlock.h:57,
                 from include/linux/capability.h:45,
                 from include/linux/sched.h:7,
                 from include/linux/module.h:10,
                 from init/main.c:16:

include/asm/mach-xen/asm/hypercall.h: In function ‘HYPERVISOR_event_channel_op’:
include/asm/mach-xen/asm/hypercall.h:252: warning: implicit declaration of function ‘memcpy’

[...]

include/asm/mach-xen/asm/hypercall.h: In function ‘HYPERVISOR_event_channel_op’:
include/asm/mach-xen/asm/hypercall.h:252: warning: implicit declaration of function ‘memcpy’
CC arch/x86_64/kernel/x8664_ksyms-xen.o
In file included from include/asm-i386/mach-xen/asm/hypervisor.h:111,

                 from include/asm/mach-xen/asm/hypervisor.h:2,
                 from include/asm/mach-xen/asm/system.h:8,
                 from include/linux/spinlock.h:57,
                 from include/linux/capability.h:45,
                 from include/linux/sched.h:7,
                 from include/linux/module.h:10,
                 from arch/x86_64/kernel/x8664_ksyms-xen.c:2:

include/asm/mach-xen/asm/hypercall.h: In function ‘HYPERVISOR_event_channel_op’:
include/asm/mach-xen/asm/hypercall.h:252: warning: implicit declaration of function ‘memcpy’ arch/x86_64/kernel/x8664_ksyms-xen.c: At top level:
arch/x86_64/kernel/x8664_ksyms-xen.c:115: error: conflicting types for ‘memcpy’ include/asm/mach-xen/asm/hypercall.h:252: error: previous implicit declaration of ‘memcpy’ was here make[1]: *** [arch/x86_64/kernel/x8664_ksyms-xen.o] Error 1
make: *** [arch/x86_64/kernel] Error 2
r

#1 lore raw
Quoted 3 lines · Hans-Christian Armingeon

Hi,

the current hg tree doesn't compile for me.

Unfortunately the linux-2.6-hg tree lags behind the Xen sparse kernel tree by a few days. Hopefully someday we'll switch to using the linux-2.6-hg tree primarily, but ...

In the mean time, this trivial patch works for me.

changeset:   22533:97fc5b1fcfed49b2a5fc996afab68955ca8a12a5
user:        Muli Ben-Yehuda <[email protected]>
date:        Wed May 03 11:11:58 2006 +0300
files:       include/asm-i386/mach-xen/asm/hypervisor.h

description:
memcpy needs string.h

include/asm-i386/mach-xen/asm/hypervisor.h +1 -0
diff -r b60863666c0305811e05ecc8ec8317f6a2997f31 -r 97fc5b1fcfed49b2a5fc996afab68955ca8a12a5 include/asm-i386/mach-xen/asm/hypervisor.h
@@ -38,6 +38,7 @@
 #include <linux/kernel.h>
 #include <linux/version.h>
 #include <linux/errno.h>
+#include <linux/string.h>
 #include <xen/interface/xen.h>
 #include <xen/interface/dom0_ops.h>
 #include <xen/interface/event_channel.h>