void-packages/srcpkgs/qt6-pdf/patches/0116-chromium-musl-get-thre...

23 lines
831 B
Diff

--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/third_party/perfetto/include/perfetto/ext/base/thread_utils.h
+++ qt6-webengine-6.4.2/src/3rdparty/chromium/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 MaybeSetThreadName(const std
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