Skip to content

Commit

Permalink
signal.h need a definition of struct task_struct
Browse files Browse the repository at this point in the history
This fixes these build errors on powerpc:

  In file included from arch/powerpc/mm/fault.c:18:
  include/linux/signal.h:239: error: 'struct task_struct' declared inside parameter list
  include/linux/signal.h:239: error: its scope is only this definition or declaration, which is probably not what you want
  include/linux/signal.h:240: error: 'struct task_struct' declared inside parameter list
  ..

Exposed by commit e66eed6 ("list: remove prefetching from regular
list iterators"), which removed the include of <linux/prefetch.h> from
<linux/list.h>.

Without that, linux/signal.h no longer accidentally got the declaration
of 'struct task_struct'.

Fix by properly declaring the struct, rather than introducing any new
header file dependency.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Stephen Rothwell authored and Linus Torvalds committed May 20, 2011
1 parent eb04f2f commit 1477fcc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/linux/signal.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#ifdef __KERNEL__
#include <linux/list.h>

struct task_struct;

/* for sysctl */
extern int print_fatal_signals;
/*
Expand Down

0 comments on commit 1477fcc

Please sign in to comment.