aboutsummaryrefslogtreecommitdiffstats
path: root/community/mpd/stacksize.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/mpd/stacksize.patch')
-rw-r--r--community/mpd/stacksize.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/community/mpd/stacksize.patch b/community/mpd/stacksize.patch
new file mode 100644
index 0000000000..26d6f78079
--- /dev/null
+++ b/community/mpd/stacksize.patch
@@ -0,0 +1,19 @@
+diff --git a/src/thread/Thread.cxx b/src/thread/Thread.cxx
+index 2932d47..fd1f3ce 100644
+--- a/src/thread/Thread.cxx
++++ b/src/thread/Thread.cxx
+@@ -43,8 +43,12 @@ Thread::Start(void (*_f)(void *ctx), void *_ctx, Error &error)
+ #ifndef NDEBUG
+ creating = true;
+ #endif
+-
+- int e = pthread_create(&handle, nullptr, ThreadProc, this);
++ pthread_attr_t attr, *attrptr = nullptr;
++ if ((pthread_attr_init(&attr) == 0)
++ && (pthread_attr_setstacksize(&attr, 1024*1024) == 0)) {
++ attrptr = &attr;
++ }
++ int e = pthread_create(&handle, attrptr, ThreadProc, this);
+
+ if (e != 0) {
+ #ifndef NDEBUG