]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/libsystemd/sd-event/sd-event.c
Include <threads.h> if possible to get thread_local definition
authorCristian Rodríguez <crodriguez@owncloud.com>
Tue, 3 Jan 2023 17:52:08 +0000 (17:52 +0000)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 6 Mar 2023 01:04:39 +0000 (10:04 +0900)
commit5545f336fd09148e8d9aa7f83ed19384deaf7a64
tree9e450d2cc4de845cfdec4fc0796b024fd090d811
parentefcde781de4ebf7d15410b5d6cb7de3a8c67f6aa
Include <threads.h> if possible to get thread_local definition

IN C23, thread_local is a reserved keyword and we shall therefore
do nothing to redefine it. glibc has it defined for older standard
version with the right conditions.

v2 by Yu Watanabe:
Move the definition to missing_threads.h like the way we define e.g.
missing syscalls or missing definitions, and include it by the users.

Co-authored-by: Yu Watanabe <watanabe.yu+github@gmail.com>
22 files changed:
meson.build
src/basic/capability-util.c
src/basic/cgroup-util.c
src/basic/log.c
src/basic/macro.h
src/basic/memory-util.c
src/basic/missing_threads.h [new file with mode: 0644]
src/basic/process-util.c
src/basic/psi-util.c
src/basic/random-util.c
src/basic/signal-util.c
src/basic/time-util.c
src/basic/virt.c
src/libsystemd/sd-bus/sd-bus.c
src/libsystemd/sd-event/sd-event.c
src/libsystemd/sd-id128/sd-id128.c
src/libsystemd/sd-resolve/sd-resolve.c
src/login/logind-inhibit.c
src/network/networkd-route-util.c
src/nss-systemd/nss-systemd.c
src/shared/cgroup-setup.c
src/shared/uid-alloc-range.c