chiark / gitweb /
__thread --> thread_local for C11 compat
[elogind.git] / src / shared / capability.c
index cad718d749959e839616ce05ea8ec2fe2763f629..f34f6ba6f690c769004cabd7bfad4070f2664a94 100644 (file)
@@ -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)
@@ -204,7 +204,7 @@ static int drop_from_file(const char *fn, uint64_t drop) {
         if (asprintf(&p, "%u %u", lo, hi) < 0)
                 return -ENOMEM;
 
-        r = write_one_line_file(fn, p);
+        r = write_string_file(fn, p);
         free(p);
 
         return r;