Skip to content

Commit

Permalink
elfcore.h : Fix UML build breakage
Browse files Browse the repository at this point in the history
Commit a65e7bf broke the UML build with
the following error -

  In file included from fs/proc/kcore.c:17:
  include/linux/elfcore.h: In function 'elf_core_copy_task_regs':
  include/linux/elfcore.h:129: error: implicit declaration of function 'task_pt_regs'

Fix this by restoring the previous behavior of returning 0 for all arches
like UML that don't define task_pt_regs.

Signed-off-by: Parag Warudkar <parag.lkml@gmail.com>
Acked-by: Amerigo Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Parag Warudkar authored and Linus Torvalds committed Jul 8, 2009
1 parent faf80d6 commit e9bf0cc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions include/linux/elfcore.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,9 @@ static inline void elf_core_copy_kernel_regs(elf_gregset_t *elfregs, struct pt_r

static inline int elf_core_copy_task_regs(struct task_struct *t, elf_gregset_t* elfregs)
{
#ifdef ELF_CORE_COPY_TASK_REGS

#if defined (ELF_CORE_COPY_TASK_REGS)
return ELF_CORE_COPY_TASK_REGS(t, elfregs);
#else
#elif defined (task_pt_regs)
elf_core_copy_regs(elfregs, task_pt_regs(t));
#endif
return 0;
Expand Down

0 comments on commit e9bf0cc

Please sign in to comment.