void-packages/srcpkgs/qt5/patches/0031-qtscript-threading-stacksize.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

31 lines
1.4 KiB
Diff

--- qtscript/src/3rdparty/javascriptcore/JavaScriptCore/wtf/ThreadingPthreads.cpp.orig 2018-10-07 21:27:22.340218063 +0200
+++ qtscript/src/3rdparty/javascriptcore/JavaScriptCore/wtf/ThreadingPthreads.cpp 2018-10-07 21:29:30.743224688 +0200
@@ -168,8 +168,12 @@
ThreadData* threadData = new ThreadData();
threadData->entryPoint = entryPoint;
threadData->arg = data;
-
- if (pthread_create(&threadHandle, 0, runThreadWithRegistration, static_cast<void*>(threadData))) {
+ pthread_attr_t attr;
+ pthread_attr_init(&attr);
+#if !defined(__GLIBC__)
+ pthread_attr_setstacksize(&attr, 2 * 1024 * 1024);
+#endif
+ if (pthread_create(&threadHandle, &attr, runThreadWithRegistration, static_cast<void*>(threadData))) {
LOG_ERROR("Failed to create pthread at entry point %p with data %p", entryPoint, data);
delete threadData;
return 0;
@@ -180,7 +184,12 @@
ThreadIdentifier createThreadInternal(ThreadFunction entryPoint, void* data, const char*)
{
pthread_t threadHandle;
- if (pthread_create(&threadHandle, 0, entryPoint, data)) {
+ pthread_attr_t attr;
+ pthread_attr_init(&attr);
+#if !defined(__GLIBC__)
+ pthread_attr_setstacksize(&attr, 2 * 1024 * 1024);
+#endif
+ if (pthread_create(&threadHandle, &attr, entryPoint, data)) {
LOG_ERROR("Failed to create pthread at entry point %p with data %p", entryPoint, data);
return 0;
}