python-texttable: update to 1.3.1
[void-packages.git] / srcpkgs / mpd / patches / stacksize.patch
blob700423a0950bd50da80d4eccb661b85769482e52
1 --- src/thread/Thread.cxx 2018-02-03 20:15:41.896969703 +0100
2 +++ src/thread/Thread.cxx 2018-02-03 20:17:12.640990964 +0100
3 @@ -35,8 +35,12 @@
4 if (handle == nullptr)
5 throw MakeLastError("Failed to create thread");
6 #else
7 - int e = pthread_create(&handle, nullptr, ThreadProc, this);
9 + pthread_attr_t attr, *attrptr = nullptr;
10 + if ((pthread_attr_init(&attr) == 0)
11 + && (pthread_attr_setstacksize(&attr, 1024*1024) == 0)) {
12 + attrptr = &attr;
13 + }
14 + int e = pthread_create(&handle, attrptr, ThreadProc, this);
15 if (e != 0)
16 throw MakeErrno(e, "Failed to create thread");
17 #endif