From: David Miller <davem@davemloft.net>
To: hauke@hauke-m.de
Cc: linux-api@vger.kernel.org, netdev@vger.kernel.org,
g.nault@alphalink.fr, stable@vger.kernel.org
Subject: Re: [PATCH] uapi/if_ether.h: move __UAPI_DEF_ETHHDR libc define
Date: Tue, 13 Feb 2018 11:24:07 -0500 (EST) [thread overview]
Message-ID: <20180213.112407.318790592186486423.davem@davemloft.net> (raw)
In-Reply-To: <1dafbb8b-19c2-373b-3f11-2224275dac23@hauke-m.de>
From: Hauke Mehrtens <hauke@hauke-m.de>
Date: Tue, 13 Feb 2018 00:01:26 +0100
> On 02/12/2018 11:59 PM, Hauke Mehrtens wrote:
>> This fixes a compile problem of some user space applications by not
>> including linux/libc-compat.h in uapi/if_ether.h.
>>
>> linux/libc-compat.h checks which "features" the header files, included
>> from the libc, provide to make the Linux kernel uapi header files only
>> provide no conflicting structures and enums. If a user application mixes
>> kernel headers and libc headers it could happen that linux/libc-compat.h
>> gets included too early where not all other libc headers are included
>> yet. Then the linux/libc-compat.h would not prevent all the
>> redefinitions and we run into compile problems.
>> This patch removes the include of linux/libc-compat.h from
>> uapi/if_ether.h to fix the recently introduced case, but not all as this
>> is more or less impossible.
>>
>> It is no problem to do the check directly in the if_ether.h file and not
>> in libc-compat.h as this does not need any fancy glibc header detection
>> as glibc never provided struct ethhdr and should define
>> __UAPI_DEF_ETHHDR by them self when they will provide this.
>>
>> The following test program did not compile correctly any more:
>>
>> int main(void)
>> {
>> return 0;
>> }
>
> git removed the included here:
>
> #include <linux/if_ether.h>
> #include <netinet/in.h>
> #include <linux/in.h>
>
> int main(void)
> {
> return 0;
> }
Applied with this fixed up, thanks!
next prev parent reply other threads:[~2018-02-13 16:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-12 22:59 [PATCH] uapi/if_ether.h: move __UAPI_DEF_ETHHDR libc define Hauke Mehrtens
2018-02-12 23:01 ` Hauke Mehrtens
2018-02-13 16:24 ` David Miller [this message]
2018-02-13 16:52 ` Guillaume Nault
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=20180213.112407.318790592186486423.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=g.nault@alphalink.fr \
--cc=hauke@hauke-m.de \
--cc=linux-api@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stable@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;
as well as URLs for NNTP newsgroup(s).