[llvm] Add check for SYS_gettid support (PR #119742)
Brad Smith via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 13 00:32:45 PST 2024
================
@@ -140,7 +140,7 @@ uint64_t llvm::get_threadid() {
return uint64_t(getthrid());
#elif defined(__ANDROID__)
return uint64_t(gettid());
-#elif defined(__linux__)
+#elif defined(__linux__) && defined(SYS_gettid)
----------------
brad0 wrote:
It would be better to change SYS_gettid to __NR_gettid.
https://github.com/llvm/llvm-project/pull/119742
More information about the llvm-commits
mailing list