From: Petr Vorel <petr.vorel@gmail.com>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Sasha Levin <sashal@kernel.org>, Rich Felker <dalias@libc.org>,
Peter Korsgaard <peter@korsgaard.com>,
Baruch Siach <baruch@tkos.co.il>,
Florian Weimer <fweimer@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 1/2] uapi: move constants from <linux/kernel.h> to <linux/const.h>
Date: Fri, 1 Jan 2021 21:29:39 +0100 [thread overview]
Message-ID: <X++GM/DQGoDfGVuQ@pevik> (raw)
In-Reply-To: <20210101202758.28291-1-petr.vorel@gmail.com>
Hi,
> and include <linux/const.h> in UAPI headers instead of <linux/kernel.h>.
> commit a85cbe6159ffc973e5702f70a3bd5185f8f3c38d upstream.
> 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
> Link: https://lkml.kernel.org/r/20201015190013.8901-1-petr.vorel@gmail.com
> Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
> Suggested-by: Rich Felker <dalias@aerifal.cx>
> Acked-by: Rich Felker <dalias@libc.org>
> Cc: Peter Korsgaard <peter@korsgaard.com>
> Cc: Baruch Siach <baruch@tkos.co.il>
> Cc: Florian Weimer <fweimer@redhat.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
> ---
> Hi,
> could this fix be backported to stable releases?
> Maybe safer to wait till v5.11 release.
> Adjusted for stable/linux-5.10.y.
FYI: Actually no modification was needed for stable/linux-5.10.y.
Kind regards,
Petr
next prev parent reply other threads:[~2021-01-01 20:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-01 20:27 [PATCH 1/2] uapi: move constants from <linux/kernel.h> to <linux/const.h> Petr Vorel
2021-01-01 20:27 ` [PATCH 2/2] tools headers UAPI: Sync linux/const.h with the kernel headers Petr Vorel
2021-01-01 20:29 ` Petr Vorel [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-01-01 20:22 [PATCH 1/2] uapi: move constants from <linux/kernel.h> to <linux/const.h> Petr Vorel
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=X++GM/DQGoDfGVuQ@pevik \
--to=petr.vorel@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=baruch@tkos.co.il \
--cc=dalias@libc.org \
--cc=fweimer@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=peter@korsgaard.com \
--cc=sashal@kernel.org \
--cc=stable@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