From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4625 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: stat.h Date: Mon, 3 Mar 2014 23:18:10 -0500 Message-ID: <20140304041810.GF184@brightrain.aerifal.cx> References: 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 1393906706 8830 80.91.229.3 (4 Mar 2014 04:18:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Mar 2014 04:18:26 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-4629-gllmg-musl=m.gmane.org@lists.openwall.com Tue Mar 04 05:18:35 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1WKgoN-0005j5-6j for gllmg-musl@plane.gmane.org; Tue, 04 Mar 2014 05:18:35 +0100 Original-Received: (qmail 21647 invoked by uid 550); 4 Mar 2014 04:18:34 -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 21639 invoked from network); 4 Mar 2014 04:18:33 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:4625 Archived-At: On Mon, Mar 03, 2014 at 08:36:24PM +0200, Paul Schutte wrote: > Hi, > > I am trying to compile pulseaudio5 against musl, but it fails with an error > indicating that struct stat64 is not defined: > > utils/padsp.c:133:44: warning: 'struct stat64' declared inside parameter > list [enabled by default] > utils/padsp.c:133:44: warning: its scope is only this definition or > declaration, which is probably not what you want [enabled by default] It seems to depend on a bug in glibc's headers which causes the "LARGEFILE64" functions/types to get exposed even in the default feature profile (they're only intended to be exposed with _GNU_SOURCE or _LARGEFILE64_SOURCE defined). You could add one of these to your CFLAGS and get them with musl but the correct solution is just removing all these "64"s in the source, as they are not needed. However as nsz noted, the "padsp" library is an utterly broken hack that only works by chance if it works at all, and which should not be used. I have no idea what degree of work would be needed to get it "working" on the same level it "works" with glibc, but to make it actually work right with either, a great deal of work would be required. If you don't need it, see if there's just a way to skip it in the build process. > When I hack a bit and change the include in from > to , it compiles that part, but fails some where else : This change is definitely wrong. In general the linux kernel headers are not compatible with userspace (which raises the question of why they're even installed at all). Some of them are compatible, mainly ones that deal with functionality disjoint from the standard library such as accessing specific hardware devices, but stat.h is not one of these. Rich