summaryrefslogtreecommitdiff
path: root/pkg/e2fsprogs
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-06-27 15:16:39 -0700
committerMichael Forney <mforney@mforney.org>2019-06-27 18:18:34 -0700
commit1acbd4da02eb82a035c00a2f484364453469ff06 (patch)
treebaf1d665ad859818b63a523d105a5d8329446df1 /pkg/e2fsprogs
parentfe0aae18e5024fc8027846fcec45fb5f1b7a11c9 (diff)
Detect TLS support in compiler
Diffstat (limited to 'pkg/e2fsprogs')
-rw-r--r--pkg/e2fsprogs/config.h4
-rw-r--r--pkg/e2fsprogs/gen.lua3
2 files changed, 5 insertions, 2 deletions
diff --git a/pkg/e2fsprogs/config.h b/pkg/e2fsprogs/config.h
index 5f53c893..80cd9925 100644
--- a/pkg/e2fsprogs/config.h
+++ b/pkg/e2fsprogs/config.h
@@ -227,7 +227,9 @@
#endif
/* #undef STACK_DIRECTION */
#define STDC_HEADERS 1
-#define TLS __thread
+#ifdef HAVE__THREAD_LOCAL
+# define TLS _Thread_local
+#endif
#define USE_POSIX_THREADS 1
/* #undef USE_POSIX_THREADS_WEAK */
/* #undef USE_PTH_THREADS */
diff --git a/pkg/e2fsprogs/gen.lua b/pkg/e2fsprogs/gen.lua
index 96fb876f..57a06301 100644
--- a/pkg/e2fsprogs/gen.lua
+++ b/pkg/e2fsprogs/gen.lua
@@ -10,9 +10,10 @@ cflags{
}
build('cat', '$outdir/config.h', {
- '$dir/config.h',
+ '$builddir/probe/HAVE__THREAD_LOCAL',
'$builddir/probe/SIZEOF_LONG',
'$builddir/probe/SIZEOF_TIME_T',
+ '$dir/config.h',
})
set('subst', {