* question about alsa-lib commit 8c9e4114 (Add struct timeval and timespec definition when _POSIX_C_SOURCE is not defined)
@ 2013-07-24 1:10 John Spencer
0 siblings, 0 replies; only message in thread
From: John Spencer @ 2013-07-24 1:10 UTC (permalink / raw)
To: Jaroslav Kysela; +Cc: alsa-devel
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!
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-07-24 1:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-24 1:10 question about alsa-lib commit 8c9e4114 (Add struct timeval and timespec definition when _POSIX_C_SOURCE is not defined) John Spencer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.