chiark / gitweb /
tmpfiles: rename --unsafe to --boot
[elogind.git] / src / shared / capability.c
index 321952067d71469c3e9c683ff85c191695dac730..72c671cf840a5e159609e8ff7ae6e4eabd294aae 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)
@@ -137,7 +137,7 @@ int capability_bounding_set_drop(uint64_t drop, bool right_now) {
                                 r = -errno;
                                 goto finish;
                         }
-                        v = i;
+                        v = (cap_value_t) i;
 
                         /* Also drop it from the inheritable set, so
                          * that anything we exec() loses the