From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/8616 Path: news.gmane.org!not-for-mail From: Rob Landley Newsgroups: gmane.linux.lib.musl.general Subject: Re: musl and kernel headers [was Re: system-images 1.4.2: od is broken; bzip2 is missing] Date: Mon, 5 Oct 2015 21:24:01 -0500 Message-ID: <561330C1.8070205@landley.net> References: <5612925A.4070402@landley.net> <20151006014426.GL8645@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1444125722 23888 80.91.229.3 (6 Oct 2015 10:02:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 6 Oct 2015 10:02:02 +0000 (UTC) Cc: Denys Vlasenko , Aboriginal Linux , musl@lists.openwall.com To: Rich Felker Original-X-From: musl-return-8628-gllmg-musl=m.gmane.org@lists.openwall.com Tue Oct 06 12:02:01 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 1ZjP4L-0000we-2F for gllmg-musl@m.gmane.org; Tue, 06 Oct 2015 12:02:01 +0200 Original-Received: (qmail 24237 invoked by uid 550); 6 Oct 2015 10:01:58 -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 24190 invoked from network); 6 Oct 2015 10:01:50 -0000 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=k02eHdpmnRnF5jAYF2DNUQr8m+2PAQkvPuPrk2ko38o=; b=OC7DckwKyClIfPr88SXQTf/nPPHLynJ1RSq0zTKXcMFkbrwtNdVloMPO3veEJ0+aMB 7sOKVETxvKyh1Yer2d9R/Tu7TvoXhvSn+iAJKT84fWnUJFoXgiWn2MNV+M0xzilgIWuk wBtp9tXouXhUHm8/jT0WyadbkqrxwWmCvZFMEULUIzELpuyvdjDeCfEnUcLFFlt2dI/p WenW+KOaV/Gen4HL25Yyi4RXPPuZ2hRBZxfVFkRiyzPOAMzfgjY5WbwtnU+mcvXW2kWG HjHetf8bQahhRUKW0etYtfg1HE1h/fSWQDbTlN5H1+feeKGdoeKT2fNz/TKU82atiq7Q Mkpw== X-Gm-Message-State: ALoCoQkbc84fLrs6j6XQguuwf52DDys1zHTY3qAy4uKnA6nn6LQgkj/zM7h5VKELxDWJfJvnbFPa X-Received: by 10.182.213.68 with SMTP id nq4mr19788404obc.16.1444125698177; Tue, 06 Oct 2015 03:01:38 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 In-Reply-To: <20151006014426.GL8645@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:8616 Archived-At: On 10/05/2015 08:44 PM, Rich Felker wrote: > On Mon, Oct 05, 2015 at 10:08:10AM -0500, Rob Landley wrote: > The cleaner approach is just avoiding including both the kernel > headers and libc/userspace headers for the same things in the same > file. In theory this may be hard in some cases, but I find that I can > almost always fix these sorts of errors during a build by commenting > out one or two #include lines. I am _deeply_ curious how you'd get linux/loop.h on a platform where you need the 32 bit loopback structure definition without including the kernel header. I struggled with that one a lot back in the busybox days. (For the 64 bit version you can block copy the structure out of the header into your program, just like you can block copy everything out of headers and never actually #include anything, in the name of portability!) Sadly, the kernel headers are exported for a _reason_. If I need to syscall something you haven't wrapped, I need the _NR_ and it varies per target. It's a thing. Rob