summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/utxdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/gen/utxdb.c')
-rw-r--r--lib/libc/gen/utxdb.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libc/gen/utxdb.c b/lib/libc/gen/utxdb.c
index 743629d..6667129 100644
--- a/lib/libc/gen/utxdb.c
+++ b/lib/libc/gen/utxdb.c
@@ -126,7 +126,11 @@ utx_to_futx(const struct utmpx *ut, struct futx *fu)
struct utmpx *
futx_to_utx(const struct futx *fu)
{
+#ifdef __NO_TLS
static struct utmpx *ut;
+#else
+ static _Thread_local struct utmpx *ut;
+#endif
if (ut == NULL) {
ut = calloc(1, sizeof *ut);
OpenPOWER on IntegriCloud