blob: 45e5055fc3de75d86978c0587676de4406428c83 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
/* SPDX-License-Identifier: LGPL-2.1-only */
/*
* The Rin Library – various compatibility constructs
*
* Copyright (C) 2019 Gediminas Jakutis
*/
#ifndef LIBRIN_COMPAT_INCLUDED
#define LIBRIN_COMPAT_INCLUDED
#ifdef RIN_NEED_GETTID
#include <unistd.h>
# ifdef __GLIBC__
# if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 29)
# include <sys/types.h>
# else
# include <sys/syscall.h>
# define gettid() (syscall(SYS_gettid))
# endif
# endif
#endif /* RIN_NEED_GETTID */
#endif /* LIBRIN_COMPAT_INCLUDED */
|