From: Rich Felker <dalias@aerifal.cx>
To: Petr Vorel <petr.vorel@gmail.com>
Cc: linux-kernel@vger.kernel.org, musl@lists.openwall.com,
Peter Korsgaard <peter@korsgaard.com>,
Baruch Siach <baruch@tkos.co.il>,
Florian Weimer <fweimer@redhat.com>,
linux-api@vger.kernel.org, libc-alpha@sourceware.org
Subject: Re: [musl] [PATCH v3 1/1] uapi: Move constants from <linux/kernel.h> to <linux/const.h>
Date: Thu, 15 Oct 2020 16:06:23 -0400 [thread overview]
Message-ID: <20201015200622.GY17637@brightrain.aerifal.cx> (raw)
In-Reply-To: <20201015190013.8901-1-petr.vorel@gmail.com>
On Thu, Oct 15, 2020 at 09:00:13PM +0200, Petr Vorel wrote:
> and include <linux/const.h> in UAPI headers instead of <linux/kernel.h>.
>
> The reason is to avoid indirect <linux/sysinfo.h> include when using
> some network headers: <linux/netlink.h> or others -> <linux/kernel.h>
> -> <linux/sysinfo.h>.
>
> This indirect include causes on MUSL redefinition of struct sysinfo when
> included both <sys/sysinfo.h> and some of UAPI headers:
>
> In file included from x86_64-buildroot-linux-musl/sysroot/usr/include/linux/kernel.h:5,
> from x86_64-buildroot-linux-musl/sysroot/usr/include/linux/netlink.h:5,
> from ../include/tst_netlink.h:14,
> from tst_crypto.c:13:
> x86_64-buildroot-linux-musl/sysroot/usr/include/linux/sysinfo.h:8:8: error: redefinition of ‘struct sysinfo’
> struct sysinfo {
> ^~~~~~~
> In file included from ../include/tst_safe_macros.h:15,
> from ../include/tst_test.h:93,
> from tst_crypto.c:11:
> x86_64-buildroot-linux-musl/sysroot/usr/include/sys/sysinfo.h:10:8: note: originally defined here
>
> Suggested-by: Rich Felker <dalias@aerifal.cx>
> Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
> ---
> Changes v2->v3:
> * Move things to <linux/const.h> instead of creating new header
> <linux/align.h>.
>
> Kind regards,
> Petr
>
> include/uapi/linux/const.h | 5 +++++
> include/uapi/linux/ethtool.h | 2 +-
> include/uapi/linux/kernel.h | 9 +--------
> include/uapi/linux/lightnvm.h | 2 +-
> include/uapi/linux/mroute6.h | 2 +-
> include/uapi/linux/netfilter/x_tables.h | 2 +-
> include/uapi/linux/netlink.h | 2 +-
> include/uapi/linux/sysctl.h | 2 +-
> 8 files changed, 12 insertions(+), 14 deletions(-)
Acked-by: Rich Felker <dalias@libc.org>
prev parent reply other threads:[~2020-10-15 20:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-15 19:00 Petr Vorel
2020-10-15 20:06 ` Rich Felker [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=20201015200622.GY17637@brightrain.aerifal.cx \
--to=dalias@aerifal.cx \
--cc=baruch@tkos.co.il \
--cc=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=musl@lists.openwall.com \
--cc=peter@korsgaard.com \
--cc=petr.vorel@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.
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).