All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olaf Hering <olaf@aepfle.de>
To: Hugh Dickins <hugh@veritas.com>, stable@kernel.org
Cc: linuxppc-dev@ozlabs.org, Paul Mackerras <paulus@samba.org>
Subject: [PATCH] include stddef.h in asm-powerpc/current.h to get definition of offsetof
Date: Sun, 25 Feb 2007 20:04:18 +0100	[thread overview]
Message-ID: <20070225190418.GA11805@aepfle.de> (raw)
In-Reply-To: <Pine.LNX.4.64.0610311834580.26470@blonde.wat.veritas.com>

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>

---
 include/asm-powerpc/current.h |    1 +
 1 file changed, 1 insertion(+)

Index: linux-2.6.18.8/include/asm-powerpc/current.h
===================================================================
--- linux-2.6.18.8.orig/include/asm-powerpc/current.h
+++ linux-2.6.18.8/include/asm-powerpc/current.h
@@ -12,6 +12,7 @@
 struct task_struct;
 
 #ifdef __powerpc64__
+#include <linux/stddef.h>
 #include <asm/paca.h>
 
 static inline struct task_struct *get_current(void)

  parent reply	other threads:[~2007-02-25 19:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-31 18:39 [PATCH 1/5] ppc64: make current preempt safe Hugh Dickins
2006-10-31 18:40 ` [PATCH 2/5] ppc64: make high hugepage areas " Hugh Dickins
2006-11-01  3:42   ` David Gibson
2006-10-31 18:41 ` [PATCH 3/5] ppc64: make mmiowb's io_sync " Hugh Dickins
2006-10-31 18:43 ` [PATCH 4/5] ppc64: make soft_enabled irqs " Hugh Dickins
2006-11-10  9:18   ` Paul Mackerras
2006-11-10 21:32     ` Hugh Dickins
2006-10-31 18:44 ` [PATCH 5/5] ppc64: support CONFIG_DEBUG_PREEMPT Hugh Dickins
2007-02-25 19:04 ` Olaf Hering [this message]
2007-02-26 11:34   ` [PATCH] include stddef.h in asm-powerpc/current.h to get definition of offsetof Hugh Dickins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070225190418.GA11805@aepfle.de \
    --to=olaf@aepfle.de \
    --cc=hugh@veritas.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    --cc=stable@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.