summaryrefslogtreecommitdiff
path: root/sysdeps/pthread
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/pthread')
-rw-r--r--sysdeps/pthread/threads.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sysdeps/pthread/threads.h b/sysdeps/pthread/threads.h
index 687b45c610..13c8f35768 100644
--- a/sysdeps/pthread/threads.h
+++ b/sysdeps/pthread/threads.h
@@ -27,7 +27,9 @@ __BEGIN_DECLS
#include <bits/thread-shared-types.h>
#include <bits/types/struct_timespec.h>
-#ifndef __cplusplus
+#if (!defined __STDC_VERSION__ \
+ || __STDC_VERSION__ <= 201710L \
+ || !__GNUC_PREREQ (13, 0)) && !defined __cplusplus
# define thread_local _Thread_local
#endif