From 42f7cda0cc181fb90bbe7c8c892c451914b72fd4 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sun, 1 Feb 2009 00:32:12 +0100 Subject: [PATCH] processes plugin: Fix the ARG_MAX stuff yet again. The `sysconf' approach does not work when doing something like char cmdline[ARG_MAX]; which is exactly what was done in the processes plugin. Just use 4k whenever the define is not available - ought to be enough for anybody! ;) --- src/processes.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/processes.c b/src/processes.c index 5b244a6c..0b824821 100644 --- a/src/processes.c +++ b/src/processes.c @@ -83,13 +83,6 @@ # ifndef CONFIG_HZ # define CONFIG_HZ 100 # endif -# ifndef ARG_MAX -# if defined(HAVE_SYSCONF) && HAVE_SYSCONF && defined(_SC_ARG_MAX) -# define ARG_MAX sysconf(_SC_ARG_MAX) -# else -# define ARG_MAX 4096 -# endif -# endif /* #endif KERNEL_LINUX */ #elif HAVE_LIBKVM_GETPROCS @@ -109,6 +102,10 @@ # include #endif +#ifndef ARG_MAX +# define ARG_MAX 4096 +#endif + #define BUFSIZE 256 static const char *config_keys[] = -- 2.30.2