summaryrefslogtreecommitdiffstats
path: root/chromium/patches/033-perfetto-get-thread-name.patch
blob: 4014d1ee5e69133743924da78699048ec81f4580 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- a/third_party/perfetto/include/perfetto/ext/base/thread_utils.h
+++ b/third_party/perfetto/include/perfetto/ext/base/thread_utils.h
@@ -30,7 +30,8 @@
 #include <algorithm>
 #endif
 
-#if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)
+#if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) || \
+    (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) && !defined(__GLIBC__))
 #include <sys/prctl.h>
 #endif
 
@@ -58,7 +59,8 @@
 
 inline bool GetThreadName(std::string& out_result) {
   char buf[16] = {};
-#if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)
+#if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) || \
+    (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) && !defined(__GLIBC__))
   if (prctl(PR_GET_NAME, buf) != 0)
     return false;
 #else