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.patch24
1 files changed, 11 insertions, 13 deletions
diff --git a/community/mpd/stacksize.patch b/community/mpd/stacksize.patch
index 26d6f78079..291a2f22d7 100644
--- a/community/mpd/stacksize.patch
+++ b/community/mpd/stacksize.patch
@@ -1,19 +1,17 @@
-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
--
+--- ./src/thread/Thread.cxx.orig
++++ ./src/thread/Thread.cxx
+@@ -35,8 +35,12 @@
+ if (handle == nullptr)
+ throw MakeLastError("Failed to create thread");
+ #else
- 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)) {
++ && (pthread_attr_setstacksize(&attr, 1024*1024) == 0)) {
+ attrptr = &attr;
+ }
+ int e = pthread_create(&handle, attrptr, ThreadProc, this);
-
- if (e != 0) {
- #ifndef NDEBUG
+ if (e != 0)
+ throw MakeErrno(e, "Failed to create thread");
+ #endif