diff options
author | Olaf Hering <olaf@aepfle.de> | 2007-02-25 14:04:18 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-03-08 23:03:24 -0500 |
commit | dbc11f539df7c9a32424b78afb0314c68d5e7d0b (patch) | |
tree | b220af9c4cc12b7811beb5b7ef90047468cb0c5f /include/asm-powerpc/current.h | |
parent | 1c56f838a9d0b25d68363bca133722c5330707b3 (diff) |
[POWERPC] Include stddef.h in asm-powerpc/current.h to get offsetof
On Tue, Oct 31, Hugh Dickins wrote:
> +++ linux/include/asm-powerpc/current.h 2006-10-30 19:27:05.000000000 +0000
> +static inline struct task_struct *get_current(void)
> +{
> + struct task_struct *task;
> +
> + __asm__ __volatile__("ld %0,%1(13)"
> + : "=r" (task)
> + : "i" (offsetof(struct paca_struct, __current)));
This breaks compile of 2.6.18.8:
CC [M] drivers/media/video/pwc/pwc-uncompress.o
In file included from /home/olaf/kernel/linux-2.6.18.8/drivers/media/video/pwc/pwc-uncompress.c:29:
include2/asm/current.h: In function 'get_current':
include2/asm/current.h:23: warning: implicit declaration of function 'offsetof'
include2/asm/current.h:23: error: expected expression before 'struct'
make[5]: *** [drivers/media/video/pwc/pwc-uncompress.o] Error 1
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc/current.h')
-rw-r--r-- | include/asm-powerpc/current.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/asm-powerpc/current.h b/include/asm-powerpc/current.h index b8708aedf925..e2c7f06931e7 100644 --- a/include/asm-powerpc/current.h +++ b/include/asm-powerpc/current.h | |||
@@ -12,6 +12,7 @@ | |||
12 | struct task_struct; | 12 | struct task_struct; |
13 | 13 | ||
14 | #ifdef __powerpc64__ | 14 | #ifdef __powerpc64__ |
15 | #include <linux/stddef.h> | ||
15 | #include <asm/paca.h> | 16 | #include <asm/paca.h> |
16 | 17 | ||
17 | static inline struct task_struct *get_current(void) | 18 | static inline struct task_struct *get_current(void) |