pkgsrc/sysutils/skill/patches/patch-ab
wiz 632c50b8b7 Add HOMEPAGE, and make compile on non-NetBSD.
From Jonathan Perkin in PR 22909.
2003-09-23 13:58:36 +00:00

28 lines
830 B
Text

$NetBSD: patch-ab,v 1.11 2003/09/23 13:58:37 wiz Exp $
--- main.c.orig Sat Apr 6 05:26:01 2002
+++ main.c Tue Sep 23 10:53:01 2003
@@ -46,7 +46,14 @@
#include <stdio.h>
#include <errno.h>
#include <pwd.h>
+#ifdef __NetBSD__
+#include <sys/sysctl.h>
+#endif
+#ifndef KI_MAXCOMLEN /* Pre NetBSD/1.5. Missing on !NetBSD */
+#define KI_MAXCOMLEN 24
+#endif
+
/*
* Processes which could not be checked -- usually due to permission
* problems (SunOS 4.1, SysVR4) -- are tallied in "MissedProcCnt".
@@ -137,7 +144,7 @@
for (i = 0; i < CmdIndx; i++) {
cmdp = (CmdList + i);
if ((cmdp->flags & CMD_FLAG_EXACT) != 0 &&
- STREQU(CMD, cmdp->cmd.cmdstr))
+ STRNEQU(CMD, cmdp->cmd.cmdstr, KI_MAXCOMLEN-8))
break;
else if ((cmdp->flags & CMD_FLAG_REGEX) != 0 &&
RegexMatch(CMD, cmdp) != 0)