summaryrefslogtreecommitdiffstats
path: root/main/collectd/fix-argmax.patch
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2014-06-20 12:04:49 +0300
committerTimo Teräs <timo.teras@iki.fi>2014-06-20 12:05:48 +0300
commit480a758e59bbe099af01d90f36e117d4342a3a18 (patch)
treebef40877ef7266dd174815d97d5497a7d6559bb6 /main/collectd/fix-argmax.patch
parent0cb0ad9ce90393df00c30433b41bab979a1abb3f (diff)
downloadaports-480a758e59bbe099af01d90f36e117d4342a3a18.tar.bz2
aports-480a758e59bbe099af01d90f36e117d4342a3a18.tar.xz
main/collectd: limit stack usage to reasonable amount
fixes a crash with musl as it defaults to smaller (sane) stack size
Diffstat (limited to 'main/collectd/fix-argmax.patch')
-rw-r--r--main/collectd/fix-argmax.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/main/collectd/fix-argmax.patch b/main/collectd/fix-argmax.patch
new file mode 100644
index 000000000..6477bd873
--- /dev/null
+++ b/main/collectd/fix-argmax.patch
@@ -0,0 +1,21 @@
+Bug reported upstream:
+https://github.com/collectd/collectd/issues/652
+
+Workaround patch by Timo Teräs <timo.teras@iki.fi>
+
+diff -ru collectd-5.4.1.orig/src/processes.c collectd-5.4.1/src/processes.c
+--- collectd-5.4.1.orig/src/processes.c 2014-01-26 10:09:14.000000000 -0200
++++ collectd-5.4.1/src/processes.c 2014-06-20 11:58:31.558125613 -0300
+@@ -128,9 +128,9 @@
+ # include <kstat.h>
+ #endif
+
+-#ifndef ARG_MAX
+-# define ARG_MAX 4096
+-#endif
++/* Force 4k ARG_MAX to make it work as stack allocated buffer */
++#undef ARG_MAX
++#define ARG_MAX 4096
+
+ typedef struct procstat_entry_s
+ {