processes plugin: Make sure ARG_MAX is defined.
[collectd.git] / src / processes.c
index 0d670f5..5b244a6 100644 (file)
 #  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