aports/main/collectd/fix-argmax.patch
Timo Teräs 480a758e59 main/collectd: limit stack usage to reasonable amount
fixes a crash with musl as it defaults to smaller (sane) stack size
2014-06-20 12:05:48 +03:00

22 lines
590 B
Diff

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
{