$OpenBSD: patch-src_processes_c,v 1.9 2016/12/12 17:55:24 landry Exp $

https://github.com/collectd/collectd/issues/2061
https://github.com/collectd/collectd/pull/2088

--- src/processes.c.orig	Wed Nov 30 09:52:01 2016
+++ src/processes.c	Mon Dec 12 18:52:34 2016
@@ -155,7 +155,7 @@
 #if defined(ARG_MAX) && (ARG_MAX < 4096)
 #define CMDLINE_BUFFER_SIZE ARG_MAX
 #else
-#define CMDLINE_BUFFER_SIZE 4096
+#define CMDLINE_BUFFER_SIZE 4*4096
 #endif
 #endif
 
@@ -1937,7 +1937,7 @@ static int ps_read(void) {
   ps_list_reset();
 
   /* Open the kvm interface, get a descriptor */
-  kd = kvm_open(NULL, NULL, NULL, 0, errbuf);
+  kd = kvm_openfiles(NULL, NULL, NULL, KVM_NO_FILES, errbuf);
   if (kd == NULL) {
     ERROR("processes plugin: Cannot open kvm interface: %s", errbuf);
     return (0);
