mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@aerifal.cx>
To: musl@lists.openwall.com
Subject: Re: stat.h
Date: Mon, 3 Mar 2014 23:18:10 -0500	[thread overview]
Message-ID: <20140304041810.GF184@brightrain.aerifal.cx> (raw)
In-Reply-To: <CAKHv7pifZuHjfxXnBGHcQYZWOeuT2qgqB235V_EK+T-X2SZeSw@mail.gmail.com>

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


  parent reply	other threads:[~2014-03-04  4:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-03 18:36 stat.h Paul Schutte
2014-03-03 19:42 ` stat.h Szabolcs Nagy
2014-03-04  4:15   ` stat.h Paul Schutte
2014-03-04  4:20     ` stat.h Rich Felker
2014-03-04  5:18       ` stat.h Paul Schutte
2014-03-04  5:31         ` stat.h Rich Felker
2014-03-04  5:33           ` stat.h Paul Schutte
2014-03-04  4:18 ` Rich Felker [this message]
2014-03-04  4:31   ` stat.h Paul Schutte

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140304041810.GF184@brightrain.aerifal.cx \
    --to=dalias@aerifal.cx \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).