From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/8665 Path: news.gmane.org!not-for-mail From: Isaac Dunham Newsgroups: gmane.linux.lib.musl.general Subject: Re: Re: musl and kernel headers [was Re: system-images 1.4.2: od is broken; bzip2 is missing] Date: Tue, 13 Oct 2015 14:55:34 -0700 Message-ID: <20151013215533.GA2073@newbook> References: <5612925A.4070402@landley.net> <20151006014426.GL8645@brightrain.aerifal.cx> <20151008165808.GZ8645@brightrain.aerifal.cx> <20151009194641.GI8645@brightrain.aerifal.cx> <20151013151048.GQ8645@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1444773371 21356 80.91.229.3 (13 Oct 2015 21:56:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 13 Oct 2015 21:56:11 +0000 (UTC) Cc: Denys Vlasenko , Aboriginal Linux To: musl@lists.openwall.com Original-X-From: musl-return-8677-gllmg-musl=m.gmane.org@lists.openwall.com Tue Oct 13 23:55:54 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Zm7Y1-0005ra-Cx for gllmg-musl@m.gmane.org; Tue, 13 Oct 2015 23:55:53 +0200 Original-Received: (qmail 25826 invoked by uid 550); 13 Oct 2015 21:55:51 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 25805 invoked from network); 13 Oct 2015 21:55:50 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=G+uYFY0l+AqmT1yazmm4jW51dt1f0NzHQHvMPmgAAE0=; b=KloqVpd/EGbQ/CPk+M6kHKDTKd+b1KuJiNOPMztB+Jh0LK37mjbILq9r8VlHTnf7ur LKPV5aQrcaAe+w2otFbstWr9V2Cchr6doHliZq76UJwGLSGSga8Yu5J7eHb5UDEO8VBf lyZmA+mHrYfZRb3sFhoWf8KS9Ur1hsjN5QCJz8PYwnAwVL94Z4zmxQopb14JFu0ZaQL2 2cuvejRzebnuOq2igNyupz5k05MD4ixj1g/8Cv8+kRuH0BJlxr8rIHqff7NXbrMBiyv6 GhfnsXeJ5w/kfPbsMqik4LeP7KUdqr6ehu/7dRPRzwgycijHyV5SyKcX3QkyGDdPdXMb f3PQ== X-Received: by 10.68.200.100 with SMTP id jr4mr44120128pbc.16.1444773338289; Tue, 13 Oct 2015 14:55:38 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20151013151048.GQ8645@brightrain.aerifal.cx> User-Agent: Mutt/1.5.24 (2015-08-30) Xref: news.gmane.org gmane.linux.lib.musl.general:8665 Archived-At: On Tue, Oct 13, 2015 at 11:10:49AM -0400, Rich Felker wrote: > On Tue, Oct 13, 2015 at 02:10:24PM +0200, Denys Vlasenko wrote: > > > The other direction, suppressing kernel headers' definition of the > > > structs, is what we want to work, but they've restricted their logic > > > for that to only work when __GLIBC__ is defined. :( > > > > Yes, you will have to do by hand the thing which kernel > > automagically does for glibc - namely, define to 0: > > > > >> #undef __UAPI_DEF_SOCKADDR_IN > > >> /* tell kernel to not define the struct */ > > >> #define __UAPI_DEF_SOCKADDR_IN 0 > > >> #endif > > > > > We could do something like this but then we would need to keep up with > > > the list of all the __UAPI defines we need to suppress unwanted kernel > > > definitions. > > > > Looking at libc-compat.h, this list is at the moment only about > > 13 defines long: > > > > #define __UAPI_DEF_IN_ADDR 0 > > #define __UAPI_DEF_IN_IPPROTO 0 > > #define __UAPI_DEF_IN_PKTINFO 0 > > #define __UAPI_DEF_IP_MREQ 0 > > #define __UAPI_DEF_SOCKADDR_IN 0 > > #define __UAPI_DEF_IN_CLASS 0 > > #define __UAPI_DEF_IN6_ADDR 0 > > #define __UAPI_DEF_SOCKADDR_IN6 0 > > #define __UAPI_DEF_IPV6_MREQ 0 > > #define __UAPI_DEF_IPPROTO_V6 0 > > #define __UAPI_DEF_IPV6_OPTIONS 0 > > #define __UAPI_DEF_IN6_PKTINFO 0 > > #define __UAPI_DEF_IP6_MTUINFO 0 > > Thanks for making the list! For the time being I don't think it would > be too objectionable to simply define these in musl. Does anyone else > have an opinion on it? I'd like to see it for the time being, though long-term I still assume that the only real solution would be something like the proposed change in libc-compat.h: -#ifdef __GLIBC__ +#if defined(__GLIBC__) || defined(__UAPI_DONTNEED_DEFS) Thanks, Isaac Dunham