Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp772935pxk; Thu, 1 Oct 2020 13:30:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/lAmuppw0DB3NuMqgJAwlWlemYwZ1DXKImGj/Hd2xiR7jcK00DsUuOEesPCyzxKif5yAC X-Received: by 2002:a50:d787:: with SMTP id w7mr10153974edi.296.1601584225746; Thu, 01 Oct 2020 13:30:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601584225; cv=none; d=google.com; s=arc-20160816; b=JE143uB6ncHUzGOyH+SS1/IJ9MX8rT/tXbxJXOzW346EqRMCE2uJT0Ax086d/Dug4S 44oiTmoJFrIGoGa07zU0Afsb1F5q1z1QlGGRNgEHoJZEy+NxI2elg67PVQALtzeu1V7s 4TX2T81Rzhou7fG18kjw7zobgc1XYELvMGwFEFFapOjIa8sOjQsy9M1glrXdyIiH4Ddb 4s/z885I7Ax0d/+fxQYVitQngmTMh8xQ9TFVdAiYssVxFnC6ZIcbvwGUNeM9569qDwqV Ug/UG8wdpmeFaeXkR4fY4dKAOiK3HlJrSdrgDDmK+mnes0jsyaC2EGcoaIhVSOrossNT b7MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=gZtY9PMTdEGH6A2+q8gmYLuwkzYxynVKdoZQM90L334=; b=WDkvrV+rGNc4zOxZQVMfmmnsS4I0DpIlyFhVer62XBvqSQwwg32YqlQXrj73+LKOXz RLE/nR4yfPqdIKxIm1oJmC+3/V7g+VM3ErsLX38YV/thVTtvQu/dnNCkhCoqtuZCf2jb H/JdX3AsmTWRlTJu18esXG86rn5pYUJ3qkCIEm6g9GpYm6il9tOUBPE5O1klZ0eTJKEm 1LuGxDpkGtrYkfvvQ+8btbdBuUJiGVgwMbWnidbR3apLTsytWUTTIDJufZlClhIzlXw1 3lT5jlNhF+9OKtGn3oKi5BSctLnYETjUdSIYSq1KUSCPUwpkd4xaEa1PescN8Z9Q7yOQ zROQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p11si4219102edy.306.2020.10.01.13.30.01; Thu, 01 Oct 2020 13:30:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732896AbgJAU00 (ORCPT + 99 others); Thu, 1 Oct 2020 16:26:26 -0400 Received: from brightrain.aerifal.cx ([216.12.86.13]:59106 "EHLO brightrain.aerifal.cx" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726855AbgJAU0V (ORCPT ); Thu, 1 Oct 2020 16:26:21 -0400 X-Greylist: delayed 912 seconds by postgrey-1.27 at vger.kernel.org; Thu, 01 Oct 2020 16:26:21 EDT Date: Thu, 1 Oct 2020 16:11:08 -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 Subject: Re: [musl] [PATCH 1/1] uapi: Don't include in Message-ID: <20201001201108.GR17637@brightrain.aerifal.cx> References: <20201001195231.17226-1-petr.vorel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20201001195231.17226-1-petr.vorel@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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. Rich