diff options
-rw-r--r-- | assert/assert.h | 6 | ||||
-rw-r--r-- | sysdeps/pthread/threads.h | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/assert/assert.h b/assert/assert.h index 67f1cce5e9..b438d8eeb7 100644 --- a/assert/assert.h +++ b/assert/assert.h @@ -135,7 +135,11 @@ __END_DECLS #endif /* NDEBUG. */ -#if defined __USE_ISOC11 && !defined __cplusplus +#if (defined __USE_ISOC11 \ + && (!defined __STDC_VERSION__ \ + || __STDC_VERSION__ <= 201710L \ + || !__GNUC_PREREQ (13, 0)) \ + && !defined __cplusplus) # undef static_assert # define static_assert _Static_assert #endif 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 |