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=-3.1 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 7881 invoked from network); 1 Oct 2020 22:30:01 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 1 Oct 2020 22:30:01 -0000 Received: (qmail 11916 invoked by uid 550); 1 Oct 2020 22:29:57 -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 11898 invoked from network); 1 Oct 2020 22:29:56 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:reply-to:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=AAKj3dJf1aYEpRZkFDQ7jwadjHV40sERxEArpZqpOcg=; b=CN24H7pOdz3Q3mQvWNa4iqQadizzygHHrOkrWrsGEUSO9Nfm2a40Gwb3KHXKxfjrYT pxkdia8xJpT2OLOnE8n4p9TV9E7FmljmpA4PnRITHQDlE52+6WUnozf9piRtQMrjQb/k Ry9kJmG1nD6qBh5LCmelYbcWW5kpKbXwPDJ8R39pgL8Bb8oRKh5iDkZmRlgsLoF1C9VX b6cuxQbIUMvrrY7Gv1nf15AMurYEtJOlCZuLXZdOtOvUwXLL45BHEcUsamzEcOJc3gxy Z4rsU43AYoRQh11E6gqQ+otWprMYvxM/HC5nS6ExGdHGZGg/LNwGLV8essAKPZJpVTGP PP8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:reply-to :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to; bh=AAKj3dJf1aYEpRZkFDQ7jwadjHV40sERxEArpZqpOcg=; b=k2NJMgzDqV4ppnwb5082TWXNN958Owp3zgNKWSvQ4vPnKdhcUX2MxEewM/Bt4VPEeP qyWUDCM38mRTWuT1nK3PMJtz0jhW42+7VHT8vn4DBIYH6dTUL1v2aAQAChvVT+KzJCpF IAkyNK4rvDlX+neFhHwnrMNUDRS0xtXZXPxARoVa1CvftlgOSkwFnZ5dlDECrAqQZthV zUG2+4m7kwRxjB0cJWMBx1K0FXi+zFuLf4M3SYK2CxFkBcBvyPmK3E8PX1paUDFs1xdV Os1/XTSw8gb8VvQflC16pVDN/Eem6/dF9T+zjMTHD63DZHvvBXWge+w86Ul7as5jJ7F2 SmXA== X-Gm-Message-State: AOAM533Mn7SQuvTnkbYlxLQafsKppI0zW2XkG5V9QDqilIt0l9SkYrhH PCf7YOWl4UhA4RsTT7xThIE= X-Google-Smtp-Source: ABdhPJyIexnUrKpzze/MmHSmfkLrDe5RCjgIxFaT1WXqPQAIckz3fnKCiU/u9V7v7xK3OsedNy/1tA== X-Received: by 2002:a5d:4104:: with SMTP id l4mr11370102wrp.396.1601591384928; Thu, 01 Oct 2020 15:29:44 -0700 (PDT) Date: Fri, 2 Oct 2020 00:29:42 +0200 From: Petr Vorel To: Rich Felker 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: <20201001222942.GE24195@dell5510> References: <20201001195231.17226-1-petr.vorel@gmail.com> <20201001201108.GR17637@brightrain.aerifal.cx> <20201001202703.GD24195@dell5510> <20201001215212.GS17637@brightrain.aerifal.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20201001215212.GS17637@brightrain.aerifal.cx> Subject: Re: [musl] [PATCH 1/1] uapi: Don't include in Hi, > 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? The only one I've found is const.h. Not sure it'd be better to move things there. Kind regards, Petr > Rich