mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Denys Vlasenko <vda.linux@googlemail.com>
To: Rich Felker <dalias@aerifal.cx>
Cc: Rob Landley <rob@landley.net>,
	Aboriginal Linux <aboriginal@lists.landley.net>,
	 musl <musl@lists.openwall.com>
Subject: Re: musl and kernel headers [was Re: system-images 1.4.2: od is broken; bzip2 is missing]
Date: Tue, 6 Oct 2015 18:09:15 +0200	[thread overview]
Message-ID: <CAK1hOcMFY0hV-4MrtSK-8bYB9gXHDbnO3obmyvHhSvmXwmQP0w@mail.gmail.com> (raw)
In-Reply-To: <20151006014426.GL8645@brightrain.aerifal.cx>

On Tue, Oct 6, 2015 at 3:44 AM, Rich Felker <dalias@aerifal.cx> wrote:
>> >
>> >   #include <netinet/in.h>
>> >   #include <linux/if_bridge.h>
>> > results in:
>> >   In file included from /usr/include/linux/if_bridge.h:18,
>> >                    from networking/brctl.c:67:
>> >   /usr/include/linux/in6.h:32: error: redefinition of 'struct in6_addr'
>> >   /usr/include/linux/in6.h:49: error: redefinition of 'struct sockaddr_in6'
>> >   /usr/include/linux/in6.h:59: error: redefinition of 'struct ipv6_mreq'
>> >
>> > and
>> >
>> >   #include <linux/ethtool.h>
>> >   #include <net/ethernet.h>
>> > results in:
>> >   In file included from /usr/include/net/ethernet.h:10,
>> >                    from networking/ifplugd.c:41:
>> >   /usr/include/netinet/if_ether.h:96: error: redefinition of 'struct ethhdr'
>> >
>>
>> That I leave to Rich. :)
>
> Including kernel headers is just really problematic. These days they
> try to make it work on glibc with a complex dance between glibc's
> headers and the kernel headers. You're likely to have the best luck by
> including the libc headers first.

brctl.c  was including <linux/if_bridge.h> after <netinet/in.h>


  parent reply	other threads:[~2015-10-06 16:09 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAK1hOcNm-rwGdr1_THZoHA-TTxOjpzUU=Lnraqt6mj+JmBdvFw@mail.gmail.com>
     [not found] ` <5612925A.4070402@landley.net>
2015-10-06  1:44   ` Rich Felker
2015-10-06  2:24     ` Rob Landley
2015-10-06 11:01       ` Szabolcs Nagy
2015-10-06 14:30       ` Rich Felker
2015-10-06 16:05         ` Denys Vlasenko
2015-10-06 16:09     ` Denys Vlasenko [this message]
2015-10-08 16:58       ` Rich Felker
2015-10-09 19:11         ` Denys Vlasenko
2015-10-09 19:46           ` Rich Felker
2015-10-10  4:56             ` Rob Landley
2015-10-13 12:10             ` Denys Vlasenko
2015-10-13 14:16               ` Ruben Winistörfer
2015-10-13 14:53               ` Szabolcs Nagy
2015-10-13 15:05                 ` Rich Felker
2015-10-13 18:02                   ` Denys Vlasenko
2015-10-13 18:56                     ` Rich Felker
2015-10-13 15:10               ` Rich Felker
2015-10-13 21:55                 ` Isaac Dunham

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=CAK1hOcMFY0hV-4MrtSK-8bYB9gXHDbnO3obmyvHhSvmXwmQP0w@mail.gmail.com \
    --to=vda.linux@googlemail.com \
    --cc=aboriginal@lists.landley.net \
    --cc=dalias@aerifal.cx \
    --cc=musl@lists.openwall.com \
    --cc=rob@landley.net \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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).