From: Jeff Dike <jdike@addtoit.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:25:07 -0500 [thread overview]
Message-ID: <20061119142507.GA3284@ccure.user-mode-linux.org> (raw)
In-Reply-To: <20061119120000.GA4926@aepfle.de>
On Sun, Nov 19, 2006 at 01:00:01PM +0100, Olaf Hering wrote:
>
> 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?
It obviously works for me. offsetof is very standard C. I'd venture
to say that a system which can't find it has a broken gcc installation.
> If so, is linux/stddef.h or /usr/include/linux/stddef.h used during
> compilation?
/usr/include/linux/stddef.h (but see below) - this is a userspace
file, so it builds against libc headers.
> The x86_64 variant looks weird as well, linux/stddef.h is appearently
> included via some other headers.
Well, /usr/include/linux/stddef.h on my x86_64 box has no offsetof,
despite being FC5 just like my i386 laptop. Yay for consistency.
However, there is a /usr/lib/gcc/x86_64-redhat-linux/4.1.1/include/stddef.h
which defines offsetof (and there's a corresponding file on my
laptop), so I bet that's the true source of offsetof.
Jeff
--
Work email - jdike at linux dot intel dot com
next prev parent reply other threads:[~2006-11-19 14:28 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 [this message]
2006-11-19 15:58 ` Olaf Hering
2006-11-19 19:35 ` Jeff Dike
2006-11-19 17:08 ` Roland Dreier
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=20061119142507.GA3284@ccure.user-mode-linux.org \
--to=jdike@addtoit.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