forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-02-17 557c24d082b6ecb9bfe5407b77ae43fa7650a5dc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Musl does not provide pthread_getname_np
 
Upstream-Status: Inappropriate
Signed-off-by: Khem Raj <raj.khem@gmail.com>
 
--- a/third_party/perfetto/include/perfetto/ext/base/thread_utils.h
+++ b/third_party/perfetto/include/perfetto/ext/base/thread_utils.h
@@ -61,9 +61,11 @@ inline bool GetThreadName(std::string& o
 #if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)
   if (prctl(PR_GET_NAME, buf) != 0)
     return false;
-#else
+#elif defined(__GLIBC__)
   if (pthread_getname_np(pthread_self(), buf, sizeof(buf)) != 0)
     return false;
+#else
+  return false;
 #endif
   out_result = std::string(buf);
   return true;