summaryrefslogtreecommitdiff
path: root/src/libsystemd-id128
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/libsystemd-id128
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/libsystemd-id128')
-rw-r--r--src/libsystemd-id128/sd-id128.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsystemd-id128/sd-id128.c b/src/libsystemd-id128/sd-id128.c
index 07d241534e..9ee40ab91e 100644
--- a/src/libsystemd-id128/sd-id128.c
+++ b/src/libsystemd-id128/sd-id128.c
@@ -104,8 +104,8 @@ static sd_id128_t make_v4_uuid(sd_id128_t id) {
}
_public_ int sd_id128_get_machine(sd_id128_t *ret) {
- static __thread sd_id128_t saved_machine_id;
- static __thread bool saved_machine_id_valid = false;
+ static thread_local sd_id128_t saved_machine_id;
+ static thread_local bool saved_machine_id_valid = false;
_cleanup_close_ int fd = -1;
char buf[33];
ssize_t k;
@@ -153,8 +153,8 @@ _public_ int sd_id128_get_machine(sd_id128_t *ret) {
}
_public_ int sd_id128_get_boot(sd_id128_t *ret) {
- static __thread sd_id128_t saved_boot_id;
- static __thread bool saved_boot_id_valid = false;
+ static thread_local sd_id128_t saved_boot_id;
+ static thread_local bool saved_boot_id_valid = false;
_cleanup_close_ int fd = -1;
char buf[36];
ssize_t k;