Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 3 Mar 2014 23:18:10 -0500
From: Rich Felker <dalias@...ifal.cx>
To: musl@...ts.openwall.com
Subject: Re: stat.h

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 <sys/stat.h> from <bits/stat.h>
> to <asm/stat.h>, 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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.