From: Rob Landley <rob@landley.net>
To: kernel list <linux-kernel@vger.kernel.org>
Cc: Ben Hutchings <ben@decadent.org.uk>
Subject: git 9c501935a3cd broke the strace build.
Date: Thu, 14 Jan 2010 04:57:00 -0600 [thread overview]
Message-ID: <201001140457.00696.rob@landley.net> (raw)
> net: Support inclusion of <linux/socket.h> before <sys/socket.h>
>
> The following user-space program fails to compile:
>
> #include <linux/socket.h>
> #include <sys/socket.h>
Did it ever? Isn't #including both sys/thingy and a linux/thingy in the same
program considered bad form?
> int main() { return 0; }
>
> The reason is that <linux/socket.h> tests __GLIBC__ to decide whether it
> should define various structures and macros that are now defined for
> user-space by <sys/socket.h>, but __GLIBC__ is not defined if no libc
> headers have yet been included.
Specifically, one of the tests was !__GLIBC__, I.E. checking that we _haven't_
included any of glibc's headers yet, which is presumably how you broke the
strace 4.5.18 ./configure test checking for the existence of the
linux/netlink.h file. (That test #includes stddef.h, linux/socket.h, and
linux/netlink.h and nothing else. Since stddef.h is a gcc header and not a
glibc header, __GLIBC__ isn't defined for the test code and thus that used to
work under 2.5.31. Now under 2.6.32 it dies with:
linux/netlink.h:35: error: expected specifier-qualifier-list before
'sa_family_t'
And later on the strace build breaks because it doesn't #include
linux/netlink.h when it needs to. (Why yes, autoconf _is_ brittle and near-
useless, thanks for noticing.)
*shrug* I can patch the strace ./configure to include bits/socket.h instead of
linux/socket.h, but what I can't understand is why _you_ couldn't. (What use
case did this patch actually fix? Would reversing the order of those two
headers have helped?)
Rob
--
Latency is more important than throughput. It's that simple. - Linus Torvalds
next reply other threads:[~2010-01-14 10:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-14 10:57 Rob Landley [this message]
2010-01-14 14:06 ` git 9c501935a3cd broke the strace build Ben Hutchings
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=201001140457.00696.rob@landley.net \
--to=rob@landley.net \
--cc=ben@decadent.org.uk \
--cc=linux-kernel@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox