fix warning in kernel/elfcore.c from ARM's elf.h
Subsystems (2)
PATCH 1/1 fix warning in kernel/elfcore.c from ARM's elf.h
2.6.34-rc1 added kernel/elfcore.c which includes <asm/elf.h>. On ARM, this results in:
In file included from include/linux/elf.h:7,
from kernel/elfcore.c:1:/tmp/linux-2.6.34-rc1/arch/arm/include/asm/elf.h:101: warning: 'struct task_struct' declared inside parameter list /tmp/linux-2.6.34-rc1/arch/arm/include/asm/elf.h:101: warning: its scope is only this definition or declaration, which is probably not what you want
Including <linux/sched.h> seems a bit heavyweight, so this patch just adds a tentative declaration of struct task_struct in <asm/elf.h>.
---
arch/arm/include/asm/elf.h +1 -0
@@ -98,6 +98,7 @@ extern int elf_check_arch(const struct eextern int arm_elf_read_implies_exec (const struct elf32_hdr *,int );#define elf_read_implies_exec (ex,stk) arm_elf_read_implies_exec(&(ex), stk) +struct task_struct ;int dump_task_regs (struct task_struct *t,elf_gregset_t *elfregs);#define ELF_CORE_COPY_TASK_REGS dump_task_regs
PATCH 1/1 fix warning in kernel/elfcore.c from ARM's elf.h
Quoted 10 lines · Mikael Pettersson
2.6.34-rc1 added
kernel/elfcore.cwhich includes <asm/elf.h>. On ARM, this results in:In file included from
include/linux/elf.h:7,
fromkernel/elfcore.c:1:/tmp/linux-2.6.34-rc1/arch/arm/include/asm/elf.h:101: warning: 'structtask_struct' declared inside parameter list/tmp/linux-2.6.34-rc1/arch/arm/include/asm/elf.h:101: warning: its scope is only this definition or declaration, which is probably not what you wantIncluding <
linux/sched.h> seems a bit heavyweight, so this patch just adds a tentative declaration of structtask_structin <asm/elf.h>.
Ok.