logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git
commit: a87a386e3a5ef715fc65affe9dfa9eae09d13270
parent ad2697b3e770cf8c1ba4ad79e49a713bd93b6d28
Author: Michael Forney <mforney@mforney.org>
Date:   Fri,  5 Jul 2019 04:42:52 -0700

alsa-lib: Detect whether TLS is available

Diffstat:

Mpkg/alsa-lib/config.h5++++-
Mpkg/alsa-lib/gen.lua7+++++++
2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/pkg/alsa-lib/config.h b/pkg/alsa-lib/config.h @@ -40,7 +40,10 @@ #define HAVE_UNISTD_H 1 #define HAVE_USELOCALE 1 /* #undef HAVE_WORDEXP */ -#define HAVE___THREAD 1 +#ifdef HAVE__THREAD_LOCAL +# define HAVE___THREAD 1 +# define __thread _Thread_local +#endif #define LT_OBJDIR ".libs/" /* #undef NDEBUG */ #define PACKAGE "alsa-lib" diff --git a/pkg/alsa-lib/gen.lua b/pkg/alsa-lib/gen.lua @@ -1,9 +1,15 @@ cflags{ + '-I $outdir', '-I $dir', '-I $dir/alsa', '-I $srcdir/include', } +build('cat', '$outdir/config.h', { + '$builddir/probe/HAVE__THREAD_LOCAL', + '$dir/config.h', +}) + pkg.hdrs = { copy('$outdir/include/alsa', '$srcdir/include/alsa', { 'asoundef.h', @@ -30,6 +36,7 @@ pkg.hdrs = { }), copy('$outdir/include/alsa', '$dir/alsa', {'asoundlib.h', 'version.h'}), } +pkg.deps = {'$outdir/config.h'} cc('src/pcm/pcm.c') build('objcopy', '$outdir/src/pcm/pcm.nowarn.c.o', '$outdir/src/pcm/pcm.c.o', {