diff -ru proctools-0.4pre1/pfind/pfind.c proctools-0.4pre1-patched/pfind/pfind.c
--- proctools-0.4pre1/pfind/pfind.c	2003-12-06 11:45:21.000000000 +0100
+++ proctools-0.4pre1-patched/pfind/pfind.c	2012-08-10 15:12:16.000000000 +0200
@@ -434,11 +434,11 @@
 PFIND_EVAL(pfind_pri_any)
 {
 	int result;
-	result = !regexec(&(*expression)->optarg.re.r, proctoolslist->name, 0, NULL, NULL);
+	result = !regexec(&(*expression)->optarg.re.r, proctoolslist->name, 0, NULL, 0);
 	if (!result) {
 		const char *args;
 		args = getProcArgs(baton, proctoolslist);
-		result = args && !regexec(&(*expression)->optarg.re.r, args, 0, NULL, NULL);
+		result = args && !regexec(&(*expression)->optarg.re.r, args, 0, NULL, 0);
 		/* do not free(args) */
 	}
 	(*expression)->parent->result = (*expression)->result = (*expression)->invert_after ^ result;
@@ -450,7 +450,7 @@
 	const char *args;
 	int result;
 	args = getProcArgs(baton, proctoolslist);
-	result = args && !regexec(&(*expression)->optarg.re.r, args, 0, NULL, NULL);
+	result = args && !regexec(&(*expression)->optarg.re.r, args, 0, NULL, 0);
 	(*expression)->parent->result = (*expression)->result = (*expression)->invert_after ^ result;
 	/* do not free(args) */
 	return 0;
@@ -490,7 +490,7 @@
 			(*expression)->parent->result = (*expression)->result = (*expression)->invert_after ^ !strcmp(proctoolslist->name, (*expression)->optarg.str);
 	}
 	else {
-		(*expression)->parent->result = (*expression)->result = (*expression)->invert_after ^ !regexec(&(*expression)->optarg.re.r, proctoolslist->name, 0, NULL, NULL);
+		(*expression)->parent->result = (*expression)->result = (*expression)->invert_after ^ !regexec(&(*expression)->optarg.re.r, proctoolslist->name, 0, NULL, 0);
 	}
 	return 0;
 }
Only in proctools-0.4pre1-patched/pgrep: pgrep
Only in proctools-0.4pre1-patched: pgrep.1
diff -ru proctools-0.4pre1/proctools/fmt.c proctools-0.4pre1-patched/proctools/fmt.c
--- proctools-0.4pre1/proctools/fmt.c	2003-12-06 11:13:20.000000000 +0100
+++ proctools-0.4pre1-patched/proctools/fmt.c	2012-08-10 15:04:35.000000000 +0200
@@ -7,7 +7,6 @@
 #include <sys/sysctl.h>
 #include <sys/user.h>
 
-#include <kvm.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -28,31 +27,6 @@
 }
 
 void
-fmt_argv(kd, ki)
-	kvm_t *kd;
-	struct kinfo_proc *ki;
-{
-	int left = -1; /* no termwidth! */
-	char **argv, **p;
-	if (kd != NULL) {
-		argv = kvm_getargv(kd, ki, 0);
-		if ((p = argv) != NULL) {
-			while (*p) {
-				fmt_puts(*p, &left);
-				p++;
-				fmt_putc(' ', &left);
-			}
-		}
-	}
-	if (argv == NULL || argv[0] == '\0' ||
-		strcmp(cmdpart(argv[0]), ki->kp_proc.p_comm)) {
-		fmt_putc('(', &left);
-		fmt_puts(ki->kp_proc.p_comm, &left);
-		fmt_putc(')', &left);
-	}
-}
-
-void
 fmt_puts(s, leftp)
 	char *s;
 	int *leftp;
diff -ru proctools-0.4pre1/proctools/proctools.c proctools-0.4pre1-patched/proctools/proctools.c
--- proctools-0.4pre1/proctools/proctools.c	2003-12-06 12:41:26.000000000 +0100
+++ proctools-0.4pre1-patched/proctools/proctools.c	2012-08-10 15:06:47.000000000 +0200
@@ -23,7 +23,6 @@
 
 extern char *cmdpart(char *);
 extern void  fmt_puts(char *, int *);
-extern void  fmt_argv(kvm_t *kd, struct kinfo_proc *ki);
 
 static char  dbuf[DUMPBUFSZ];
 
@@ -919,7 +918,7 @@
 								matched = !strcmp(name, pattern);
 						}
 						else {
-							matched = regexec(&regex, name, 0, NULL, NULL) == 0;
+							matched = regexec(&regex, name, 0, NULL, 0) == 0;
 						}
 					}
 					else {
@@ -960,7 +959,7 @@
 						}
 					}
 					else
-						if (regexec(&regex, name, 0, NULL, NULL) == 0)
+						if (regexec(&regex, name, 0, NULL, 0) == 0)
 							pushProcList(proctoolslist, kp);
 				}
 				else
@@ -995,7 +994,7 @@
 								matched = !strcmp(name, pattern);
 						}
 						else {
-							matched = regexec(&regex, name, 0, NULL, NULL) == 0;
+							matched = regexec(&regex, name, 0, NULL, 0) == 0;
 						}
 					}
 					else {
@@ -1037,7 +1036,7 @@
 						}
 					}
 					else
-						if (regexec(&regex, name, 0, NULL, NULL) == REG_NOMATCH)
+						if (regexec(&regex, name, 0, NULL, 0) == REG_NOMATCH)
 							pushProcList(proctoolslist, kp);
 				}
 				else
diff -ru proctools-0.4pre1/proctools/proctools.h proctools-0.4pre1-patched/proctools/proctools.h
--- proctools-0.4pre1/proctools/proctools.h	2003-12-06 12:12:04.000000000 +0100
+++ proctools-0.4pre1-patched/proctools/proctools.h	2012-08-10 15:05:54.000000000 +0200
@@ -5,19 +5,9 @@
 
 #include <sys/cdefs.h>
 #include <stdio.h>
-#include <kvm.h>
 
-#if !defined(USE_KVM) && !defined(USE_SYSCTL)
-#	if defined(KVM_NO_FILES)
-#		define USE_KVM
-#		define USE_KVM_NO_FILES
-#	elif defined(KERN_PROCARGS2)
-#		define USE_SYSCTL
-#	else
-#		define USE_KVM
-/* without USE_KVM_NO_FILES */
-#	endif
-#endif
+
+#define USE_SYSCTL
 
 #ifndef TRUE
 #define TRUE (1)