mpd: set pthread stack sizes (Alpine patch)
This commit is contained in:
parent
820f85f51d
commit
5d65448221
2 changed files with 20 additions and 1 deletions
srcpkgs/mpd
19
srcpkgs/mpd/patches/stacksize.patch
Normal file
19
srcpkgs/mpd/patches/stacksize.patch
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
diff --git a/src/thread/Thread.cxx b/src/thread/Thread.cxx
|
||||||
|
index 2932d47..fd1f3ce 100644
|
||||||
|
--- src/thread/Thread.cxx
|
||||||
|
+++ 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
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'mpd'
|
# Template file for 'mpd'
|
||||||
pkgname=mpd
|
pkgname=mpd
|
||||||
version=0.20.1
|
version=0.20.1
|
||||||
revision=1
|
revision=2
|
||||||
build_style=gnu-configure
|
build_style=gnu-configure
|
||||||
configure_args="--enable-opus --enable-mikmod --enable-neighbor-plugins
|
configure_args="--enable-opus --enable-mikmod --enable-neighbor-plugins
|
||||||
--enable-soundcloud --enable-pipe-output --disable-twolame-encoder
|
--enable-soundcloud --enable-pipe-output --disable-twolame-encoder
|
||||||
|
|
Loading…
Reference in a new issue