netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Baruch Siach <baruch@tkos.co.il>
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	netdev@vger.kernel.org, Aya Levin <ayal@mellanox.com>,
	Moshe Shemesh <moshe@mellanox.com>
Subject: Re: [PATCH] devlink: fix libc and kernel headers collision
Date: Mon, 3 Jun 2019 07:58:41 +0200	[thread overview]
Message-ID: <20190603055841.GA2202@nanopsycho> (raw)
In-Reply-To: <602128d22db86bd67e11dec8fe40a73832c222c9.1559230347.git.baruch@tkos.co.il>

Thu, May 30, 2019 at 05:32:27PM CEST, baruch@tkos.co.il wrote:
>Since commit 2f1242efe9d ("devlink: Add devlink health show command") we
>use the sys/sysinfo.h header for the sysinfo(2) system call. But since
>iproute2 carries a local version of the kernel struct sysinfo, this
>causes a collision with libc that do not rely on kernel defined sysinfo
>like musl libc:
>
>In file included from devlink.c:25:0:
>.../sysroot/usr/include/sys/sysinfo.h:10:8: error: redefinition of 'struct sysinfo'
> struct sysinfo {
>        ^~~~~~~
>In file included from ../include/uapi/linux/kernel.h:5:0,
>                 from ../include/uapi/linux/netlink.h:5,
>                 from ../include/uapi/linux/genetlink.h:6,
>                 from devlink.c:21:
>../include/uapi/linux/sysinfo.h:8:8: note: originally defined here
> struct sysinfo {
>		^~~~~~~
>
>Rely on the kernel header alone to avoid kernel and userspace headers
>collision of definitions.
>
>Cc: Aya Levin <ayal@mellanox.com>
>Cc: Moshe Shemesh <moshe@mellanox.com>
>Signed-off-by: Baruch Siach <baruch@tkos.co.il>

Acked-by: Jiri Pirko <jiri@mellanox.com>

  reply	other threads:[~2019-06-03  5:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-30 15:32 [PATCH] devlink: fix libc and kernel headers collision Baruch Siach
2019-06-03  5:58 ` Jiri Pirko [this message]
2019-06-03  9:02 ` Petr Vorel
2019-06-04 16:45 ` Stephen Hemminger
2019-06-04 16:47 ` Stephen Hemminger
2019-06-04 17:47   ` Baruch Siach

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=20190603055841.GA2202@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=ayal@mellanox.com \
    --cc=baruch@tkos.co.il \
    --cc=moshe@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.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).