From 92962317a06d83b961ed2e7576eafb79a4467ff4 Mon Sep 17 00:00:00 2001 From: xige-16 Date: Tue, 16 Jul 2024 12:47:42 +0800 Subject: [PATCH] Replace gettid() with syscall(SYS_gettid) (#697) Signed-off-by: xige-16 --- include/knowhere/comp/thread_pool.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/knowhere/comp/thread_pool.h b/include/knowhere/comp/thread_pool.h index 29d1eb629..b26b5706b 100644 --- a/include/knowhere/comp/thread_pool.h +++ b/include/knowhere/comp/thread_pool.h @@ -12,7 +12,14 @@ #pragma once #include + +#ifdef __linux__ #include +#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 30 +#include +#define gettid() syscall(SYS_gettid) +#endif +#endif #include #include