Netdev List
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: david.lebrun@uclouvain.be
Cc: netdev@vger.kernel.org, daniel@iogearbox.net
Subject: Re: [PATCH net v2] ipv6: sr: fix user space compilation error with old glibc
Date: Mon, 15 May 2017 10:09:22 -0400 (EDT)	[thread overview]
Message-ID: <20170515.100922.2194549018034831667.davem@davemloft.net> (raw)
In-Reply-To: <20170515110320.23369-1-david.lebrun@uclouvain.be>

From: David Lebrun <david.lebrun@uclouvain.be>
Date: Mon, 15 May 2017 13:03:20 +0200

> When seg6.h is included in a user space program that also includes
> netinet/in.h, it results in multiple definitions of structures such as
> struct in6_addr. Recent glibc versions have a workaround that consists in
> defining __USE_KERNEL_IPV6_DEFS to prevent duplicates. However, such a
> program will fail to compile with older glibc versions.
> 
> This patch ensures that including seg6.h will work in any case.
> 
> v2: do not try to handle __USE_KERNEL_IPV6_DEFS case in seg6.h
> 
> Fixes: ea3ebc73b46fbdb049dafd47543bb22efaa09c8e ("uapi: fix linux/seg6.h and linux/seg6_iptunnel.h userspace compilation errors")
> Reported-by: Daniel Borkmann <daniel@iogearbox.net>
> Signed-off-by: David Lebrun <david.lebrun@uclouvain.be>

Please, no.

The reason we put together a method by which glibc and the kernel can
stay out of eachother's way in header files is exactly so that we
don't need ifdefs that conditionally do netinet/in.h vs. using the
kernel header.

There are more than a dozen other UAPI headers which make use of
linux/in6.h and none of them jump through hoops like what is being
proposed here, and that's on purpose.

So special casing this one one header is really not the way to go.

  reply	other threads:[~2017-05-15 14:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-15 11:03 [PATCH net v2] ipv6: sr: fix user space compilation error with old glibc David Lebrun
2017-05-15 14:09 ` David Miller [this message]
2017-05-15 14:21   ` David Lebrun
2017-05-23 17:27     ` Daniel Borkmann

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=20170515.100922.2194549018034831667.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=daniel@iogearbox.net \
    --cc=david.lebrun@uclouvain.be \
    --cc=netdev@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