From 3e852b84ea9ee7e0133b098d515b17c383033fb4 Mon Sep 17 00:00:00 2001 From: Gediminas Jakutis Date: Thu, 3 Oct 2019 12:18:42 +0300 Subject: compat: move the gettid macro to compat.h. New header, meant for various compatibility definitions and such. Signed-off-by: Gediminas Jakutis --- src/diagnostic/diagnostic.c | 3 ++- src/diagnostic/diagnostic_private.h | 13 ++----------- 2 files changed, 4 insertions(+), 12 deletions(-) (limited to 'src/diagnostic') diff --git a/src/diagnostic/diagnostic.c b/src/diagnostic/diagnostic.c index 58a0292..638df52 100644 --- a/src/diagnostic/diagnostic.c +++ b/src/diagnostic/diagnostic.c @@ -18,11 +18,12 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "diagnostic_private.h" + #include #include #include "rin/diagnostic.h" #include "rin/definitions.h" -#include "diagnostic_private.h" static struct iostate { FILE *err; diff --git a/src/diagnostic/diagnostic_private.h b/src/diagnostic/diagnostic_private.h index 45d414d..96b1759 100644 --- a/src/diagnostic/diagnostic_private.h +++ b/src/diagnostic/diagnostic_private.h @@ -24,18 +24,9 @@ #include #include #include -#include - -#ifdef __GLIBC__ -# if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 29) -# include -# else -# define _GNU_SOURCE -# include -# define gettid() (syscall(SYS_gettid)) -# endif -#endif +#define RIN_NEED_GETTID +#include "rin/compat.h" static void __rin_msg(FILE *stream, const char *prefix, const char *format, va_list args); static void __rin_pidconvadjust(void); -- cgit v1.2.3