summaryrefslogtreecommitdiff
path: root/security/tcp_wrappers/patches/patch-ae
blob: 3b0e3a2a3aa8af949aacc449f4ab13ac9ad862bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
$NetBSD: patch-ae,v 1.1 2004/03/21 19:49:05 bouyer Exp $

--- tli.c.orig	Thu Feb  5 11:40:42 2004
+++ tli.c	Thu Feb  5 11:42:25 2004
@@ -40,8 +40,6 @@
 
 extern char *nc_sperror();
 extern int errno;
-extern char *sys_errlist[];
-extern int sys_nerr;
 extern int t_errno;
 extern char *t_errlist[];
 extern int t_nerr;
@@ -317,12 +315,8 @@
 	    return (t_errlist[t_errno]);
 	}
     } else {
-	if (errno < 0 || errno >= sys_nerr) {
-	    sprintf(buf, "Unknown UNIX error %d", errno);
-	    return (buf);
-	} else {
-	    return (sys_errlist[errno]);
-	}
+	strcpy(buf, strerror(errno));
+	return (buf);
     }
 }