void-packages/srcpkgs/qt5/patches/qt-musl-set_thread_name_np.patch
Jürgen Buchmüller ce232b09fa qt5: update to 5.10.1
[ci skip]

Closes: #11191 [via git-merge-pr]
2018-02-17 06:52:38 +01:00

24 lines
769 B
Diff

--- qtlocation/src/3rdparty/mapbox-gl-native/platform/default/thread.cpp 2017-11-14 18:03:52.000000000 +0100
+++ qtlocation/src/3rdparty/mapbox-gl-native/platform/default/thread.cpp 2018-01-27 19:49:19.691858141 +0100
@@ -11,17 +11,21 @@
std::string getCurrentThreadName() {
char name[32] = "unknown";
+#if defined(__GLIBC__)
pthread_getname_np(pthread_self(), name, sizeof(name));
+#endif
return name;
}
void setCurrentThreadName(const std::string& name) {
+#if defined(__GLIBC__)
if (name.size() > 15) { // Linux hard limit (see manpages).
pthread_setname_np(pthread_self(), name.substr(0, 15).c_str());
} else {
pthread_setname_np(pthread_self(), name.c_str());
}
+#endif
}
void makeThreadLowPriority() {