From 5d65448221af12296f7ef2339ced92771bb465b4 Mon Sep 17 00:00:00 2001 From: Michael Gehring Date: Wed, 11 Jan 2017 17:29:05 +0000 Subject: [PATCH] mpd: set pthread stack sizes (Alpine patch) --- srcpkgs/mpd/patches/stacksize.patch | 19 +++++++++++++++++++ srcpkgs/mpd/template | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/mpd/patches/stacksize.patch diff --git a/srcpkgs/mpd/patches/stacksize.patch b/srcpkgs/mpd/patches/stacksize.patch new file mode 100644 index 00000000000..6675975d61a --- /dev/null +++ b/srcpkgs/mpd/patches/stacksize.patch @@ -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 diff --git a/srcpkgs/mpd/template b/srcpkgs/mpd/template index f9bedf8a704..9b7089a080b 100644 --- a/srcpkgs/mpd/template +++ b/srcpkgs/mpd/template @@ -1,7 +1,7 @@ # Template file for 'mpd' pkgname=mpd version=0.20.1 -revision=1 +revision=2 build_style=gnu-configure configure_args="--enable-opus --enable-mikmod --enable-neighbor-plugins --enable-soundcloud --enable-pipe-output --disable-twolame-encoder