From: Roland Dreier <rdreier@cisco.com>
To: Olaf Hering <olaf@aepfle.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: uml fails to compile due to missing offsetof
Date: Sun, 19 Nov 2006 09:08:47 -0800 [thread overview]
Message-ID: <aday7q7jrds.fsf@cisco.com> (raw)
In-Reply-To: <20061119120000.GA4926@aepfle.de> (Olaf Hering's message of "Sun, 19 Nov 2006 13:00:01 +0100 (MET)")
> I fail to see how arch/um/sys-i386/user-offsets.c can compile since
> offsetof() was declared __KERNEL__ only in include/linux/stddef.h.
> Does it work for anyone else? If so, is linux/stddef.h or
> /usr/include/linux/stddef.h used during compilation?
> The x86_64 variant looks weird as well, linux/stddef.h is appearently
> included via some other headers.
Yes, the
#include <linux/stddef.h>
looks weird to me. AFAIK the C standard says that offsetof() comes
from plain old <stddef.h>. Does the (untested) patch below fix the
build for you?
diff --git a/arch/um/sys-i386/user-offsets.c b/arch/um/sys-i386/user-offsets.c
index 6f4ef2b..447306b 100644
--- a/arch/um/sys-i386/user-offsets.c
+++ b/arch/um/sys-i386/user-offsets.c
@@ -2,7 +2,7 @@ #include <stdio.h>
#include <signal.h>
#include <asm/ptrace.h>
#include <asm/user.h>
-#include <linux/stddef.h>
+#include <stddef.h>
#include <sys/poll.h>
#define DEFINE(sym, val) \
next prev parent reply other threads:[~2006-11-19 17:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-19 12:00 uml fails to compile due to missing offsetof Olaf Hering
2006-11-19 14:25 ` Jeff Dike
2006-11-19 15:58 ` Olaf Hering
2006-11-19 19:35 ` Jeff Dike
2006-11-19 17:08 ` Roland Dreier [this message]
2006-11-19 17:20 ` Olaf Hering
2006-11-19 19:38 ` Jeff Dike
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=aday7q7jrds.fsf@cisco.com \
--to=rdreier@cisco.com \
--cc=linux-kernel@vger.kernel.org \
--cc=olaf@aepfle.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox