From 4e9cf8c1dd4ac0845239c820a0afa45ac390985e Mon Sep 17 00:00:00 2001 From: "rongfu.leng" Date: Wed, 9 Apr 2025 10:12:44 +0800 Subject: [PATCH] [Bugfix] fix gettid method is not define (#16084) Signed-off-by: rongfu.leng --- csrc/cpu/utils.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/csrc/cpu/utils.cpp b/csrc/cpu/utils.cpp index 79771ecd..c17a8961 100644 --- a/csrc/cpu/utils.cpp +++ b/csrc/cpu/utils.cpp @@ -4,6 +4,11 @@ #include #include #endif +#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 30 + #include + #include + #define gettid() syscall(SYS_gettid) +#endif #include "cpu_types.hpp"