Files
systemd/src/basic/missing_threads.h
Mike Yuan 3ac386de0a basic/missing_threads: drop glibc < 2.16 check
glibc 2.16 has been our baseline for ~10y
(c.f. 3dd26f3e3a)
2024-12-24 16:55:21 +01:00

14 lines
398 B
C

/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
/* If threads.h doesn't exist, then define our own thread_local to match C11's thread_local. */
#if HAVE_THREADS_H
# include <threads.h>
#elif !(defined(thread_local))
# if __STDC_VERSION__ >= 201112L && !(defined(__STDC_NO_THREADS__))
# define thread_local _Thread_local
# else
# define thread_local __thread
# endif
#endif