summaryrefslogtreecommitdiff
path: root/src/shared/capability.c
diff options
context:
space:
mode:
authorShawn Landden <shawn@churchofgit.com>2013-12-15 16:24:14 -0800
committerLennart Poettering <lennart@poettering.net>2013-12-17 21:45:43 +0100
commitec202eae8e84a4c99f054f771cb832046cb8769f (patch)
tree3342ddcf1d386c7f613b60e3d72477580eb7ba06 /src/shared/capability.c
parent06db8540cdfc8259423ed90e7352dbc1d71eccd9 (diff)
__thread --> thread_local for C11 compat
Also make thread_local available w/o including <threads.h>. (as the latter hasn't been implemented, but this part is trivial)
Diffstat (limited to 'src/shared/capability.c')
-rw-r--r--src/shared/capability.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shared/capability.c b/src/shared/capability.c
index 321952067d..f34f6ba6f6 100644
--- a/src/shared/capability.c
+++ b/src/shared/capability.c
@@ -55,8 +55,8 @@ int have_effective_cap(int value) {
}
unsigned long cap_last_cap(void) {
- static __thread unsigned long saved;
- static __thread bool valid = false;
+ static thread_local unsigned long saved;
+ static thread_local bool valid = false;
unsigned long p;
if (valid)