void-packages/srcpkgs/qt5/patches/0014-musl-set_thread_name_np.patch
Jürgen Buchmüller 845f11032a
qt5: update to 5.11.2
[ci skip]

Closes: #2538 [via git-merge-pr]
Signed-off-by: Jürgen Buchmüller <pullmoll@t-online.de>
2018-11-21 19:36:58 +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() {