diff options
author | Sören Tempel <soeren+git@soeren-tempel.net> | 2017-10-19 11:42:08 +0200 |
---|---|---|
committer | Sören Tempel <soeren+git@soeren-tempel.net> | 2017-10-19 12:19:07 +0200 |
commit | 5e15f7cfb012720adb56bc085947f98fc3f8effa (patch) | |
tree | 3d3e36ce01e3e594e5a41bdbcf14f8209542cf1c /community/mpd/stacksize.patch | |
parent | 2f7c5415d86a218b7b55c037cb57954fa9086d0f (diff) | |
download | aports-5e15f7cfb012720adb56bc085947f98fc3f8effa.tar.bz2 aports-5e15f7cfb012720adb56bc085947f98fc3f8effa.tar.xz |
community/mpd: move from main
Diffstat (limited to 'community/mpd/stacksize.patch')
-rw-r--r-- | community/mpd/stacksize.patch | 19 |
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 |