netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phil Sutter <phil@nwl.cc>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Cong Wang <xiyou.wangcong@gmail.com>,
	Linux Kernel Network Developers <netdev@vger.kernel.org>
Subject: Re: iproute2 compile and linking errors on Fedora 19
Date: Tue, 27 Nov 2018 12:58:53 +0100	[thread overview]
Message-ID: <20181127115853.GB30790@orbyte.nwl.cc> (raw)
In-Reply-To: <20181126160627.6cbe8cbc@xeon-e3>

Hi,

On Mon, Nov 26, 2018 at 04:06:27PM -0800, Stephen Hemminger wrote:
> On Tue, 31 Oct 2017 16:28:20 -0700
> Cong Wang <xiyou.wangcong@gmail.com> wrote:
> 
> > On Tue, Oct 31, 2017 at 2:10 PM, Stephen Hemminger
> > <stephen@networkplumber.org> wrote:
> > >
> > > IPPROTO_MH comes from include/uapi/linux/in6.h
> > > Maybe it is trying to use old kernel headers from libc.  

That header defines it only if __UAPI_DEF_IPPROTO_V6 is defined to a
non-zero value. When compiling upstream iproute2 on my system, this is
not the case. I also see why:

- ip/xfrm_policy.c includes <netdb.h>
  - netdb.h includes <netinet/in.h>
    - netinet/in.h defines _NETINET_IN_H
- ip/xfrm_policy.c then includes "xfrm.h"
  - ip/xfrm.h includes <linux/xfrm.h>
    - linux/xfrm.h includes <linux/in6.h>
      - linux/in6.h includes <linux/libc-compat.h>
        - linux/libc-compat.h defines __UAPI_DEF_IPPROTO_V6 to 0 if
	  _NETINET_IN_H is defined.

Note that I didn't follow all includes so the above is not necessarily
what exactly happens. But either way, ip/xfrm_policy.c doesn't get
IPPROTO_MH define from include/uapi/linux/in6.h.

Cheers, Phil

      reply	other threads:[~2018-11-27 22:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-31 17:58 iproute2 compile and linking errors on Fedora 19 Cong Wang
2017-10-31 18:27 ` Cong Wang
2017-10-31 18:59   ` Eric Dumazet
2017-10-31 19:16     ` Roman Mashak
2017-10-31 19:25       ` Eric Dumazet
2017-10-31 21:06         ` Stephen Hemminger
2017-10-31 21:10 ` Stephen Hemminger
2017-10-31 23:28   ` Cong Wang
2017-11-01  6:52     ` Stephen Hemminger
2018-11-27  0:06     ` Stephen Hemminger
2018-11-27 11:58       ` Phil Sutter [this message]

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=20181127115853.GB30790@orbyte.nwl.cc \
    --to=phil@nwl.cc \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    --cc=xiyou.wangcong@gmail.com \
    /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).