alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: John Spencer <maillist-alsa@barfooze.de>
To: Jaroslav Kysela <perex@perex.cz>
Cc: alsa-devel@alsa-project.org
Subject: question about alsa-lib commit 8c9e4114 (Add struct timeval and timespec definition when _POSIX_C_SOURCE is not defined)
Date: Wed, 24 Jul 2013 03:10:11 +0200	[thread overview]
Message-ID: <51EF2973.20703@barfooze.de> (raw)

the commit 
http://git.alsa-project.org/?p=alsa-lib.git;a=commitdiff;h=8c9e4114a23aad96b4b9570624a4fd96745dfe01

was added in 2006 with a FIXME hint that it could cause a build error.
this is exactly what happens when using the header with musl libc to 
build software depending on alsa-lib (for example "sweep").

may i ask what for this hack was added ? i suspect it's for supporting 
some ancient version of glibc that didnt define those structs.
in that case something like

#if defined(__GLIBC__) && (__GLIBC__ < 2)

would probably make more sense.
i could even imagine that the target for the hack is no longer supported 
anyway, so i think it could simply be removed.

the problematic part is that it's the job of the *application* to 
request the POSIX namespace, not the job of the libc.

since sweep's build environment does not set _POSIX_SOURCE, the code 
gets activated and causes a conflict.

--JS

p.s.
thanks for applying the signal.h patch!

                 reply	other threads:[~2013-07-24  1:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=51EF2973.20703@barfooze.de \
    --to=maillist-alsa@barfooze.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=perex@perex.cz \
    /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.
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).