Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20201015200622.GY17637@brightrain.aerifal.cx>
Date: Thu, 15 Oct 2020 16:06:23 -0400
From: Rich Felker <dalias@...ifal.cx>
To: Petr Vorel <petr.vorel@...il.com>
Cc: linux-kernel@...r.kernel.org, musl@...ts.openwall.com,
	Peter Korsgaard <peter@...sgaard.com>,
	Baruch Siach <baruch@...s.co.il>,
	Florian Weimer <fweimer@...hat.com>, linux-api@...r.kernel.org,
	libc-alpha@...rceware.org
Subject: Re: [PATCH v3 1/1] uapi: Move constants from <linux/kernel.h>
 to <linux/const.h>

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@...ifal.cx>
> Signed-off-by: Petr Vorel <petr.vorel@...il.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@...c.org>

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.