From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SUBJ_OBFU_PUNCT_FEW autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 4110 invoked from network); 1 Oct 2020 21:52:30 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 1 Oct 2020 21:52:30 -0000 Received: (qmail 32228 invoked by uid 550); 1 Oct 2020 21:52:25 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 32208 invoked from network); 1 Oct 2020 21:52:25 -0000 Date: Thu, 1 Oct 2020 17:52:13 -0400 From: Rich Felker To: Petr Vorel Cc: linux-kernel@vger.kernel.org, musl@lists.openwall.com, linux-api@vger.kernel.org, libc-alpha@sourceware.org, Peter Korsgaard , Florian Weimer , Baruch Siach , "David S . Miller" , Michal Kubecek , Stephen Hemminger Message-ID: <20201001215212.GS17637@brightrain.aerifal.cx> References: <20201001195231.17226-1-petr.vorel@gmail.com> <20201001201108.GR17637@brightrain.aerifal.cx> <20201001202703.GD24195@dell5510> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20201001202703.GD24195@dell5510> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] [PATCH 1/1] uapi: Don't include in On Thu, Oct 01, 2020 at 10:27:03PM +0200, Petr Vorel wrote: > Hi Rich, > > > On Thu, Oct 01, 2020 at 09:52:31PM +0200, Petr Vorel wrote: > > > + update code where needed (include in code which > > > included only to get struct sysinfo or SI_LOAD_SHIFT). > > > > The reason is to avoid indirect include when using > > > some network headers: or others [1] -> > > > -> . > > > > This indirect include causes redefinition of struct sysinfo when > > > included both and some of network 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 > > > > [1] or , , , > > > > Suggested-by: Rich Felker > > > Signed-off-by: Petr Vorel > > > --- > > > Hi, > > > > this looks to be long standing problem: python-psutil [2], iproute2 [3], > > > even for glibc in the past [4] and it tried to be solved before [5]. > > > > This will require glibc fix after: > > > You can't do this; it breaks the existing contract with glibc. New > > kernel headers can't force a glibc upgrade. > Right, got that. > > > You just have to get rid > > of use of elsewhere in the uapi headers. It was a > > mistake that was ever separated out of > > since it didn't (and couldn't) fix the contract that > > exposes struct sysinfo (and that it's misnamed). But > > it's no big deal. This can all be fixed without any breakage anywhere > > just by not using it. > Back to your original suggestion to move the alignment macros to a separate > header. I was trying to avoid it not sure if introducing new header is > acceptable, but we'll see. Isn't there already another similar header with that type of macro that they belong in? Rich