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;
|