summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d99dc6b)
raw | patch | inline | side by side (parent: d99dc6b)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sat, 31 Jan 2009 23:32:12 +0000 (00:32 +0100) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sat, 31 Jan 2009 23:32:12 +0000 (00:32 +0100) |
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! ;)
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 | patch | blob | history |
diff --git a/src/processes.c b/src/processes.c
index 5b244a6cda6da977f82ab5e6d04caa7e0601a2ce..0b824821335c8fa72f2f4dfd5e8cda3722e44c26 100644 (file)
--- a/src/processes.c
+++ b/src/processes.c
# 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
# include <regex.h>
#endif
+#ifndef ARG_MAX
+# define ARG_MAX 4096
+#endif
+
#define BUFSIZE 256
static const char *config_keys[] =