From 302edc5f9099e40870e3649aa27f7d758822cacb Mon Sep 17 00:00:00 2001 From: joerg Date: Tue, 6 Dec 2005 13:27:01 +0000 Subject: Fix errno. On DragonFly, define HAS_STRERROR to avoid conflicts with system headers. --- sysutils/skill/patches/patch-ab | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'sysutils/skill/patches') diff --git a/sysutils/skill/patches/patch-ab b/sysutils/skill/patches/patch-ab index 92cfe1b843a..4ad1841e4cb 100644 --- a/sysutils/skill/patches/patch-ab +++ b/sysutils/skill/patches/patch-ab @@ -1,23 +1,22 @@ -$NetBSD: patch-ab,v 1.11 2003/09/23 13:58:37 wiz Exp $ +$NetBSD: patch-ab,v 1.12 2005/12/06 13:27:01 joerg Exp $ ---- main.c.orig Sat Apr 6 05:26:01 2002 -+++ main.c Tue Sep 23 10:53:01 2003 -@@ -46,7 +46,14 @@ +--- main.c.orig 2003-08-19 00:36:08.000000000 +0000 ++++ main.c +@@ -46,6 +46,13 @@ const char *CopyrightVersion = "%s %s\n\ #include #include #include +#ifdef __NetBSD__ +#include +#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 @@ +@@ -137,7 +144,7 @@ main(argc, argv) for (i = 0; i < CmdIndx; i++) { cmdp = (CmdList + i); if ((cmdp->flags & CMD_FLAG_EXACT) != 0 && @@ -26,3 +25,12 @@ $NetBSD: patch-ab,v 1.11 2003/09/23 13:58:37 wiz Exp $ break; else if ((cmdp->flags & CMD_FLAG_REGEX) != 0 && RegexMatch(CMD, cmdp) != 0) +@@ -330,8 +337,6 @@ Usage(error) + char * + SysErr() + { +- extern int errno; +- + #if defined(HAS_STRERROR) || defined(_LP64) + char *se = strerror(errno); + return((se==NULL)? "unknown error": se); -- cgit v1.2.3