summaryrefslogtreecommitdiff
path: root/databases/mysql-server/patches/patch-ac
blob: 7af2752909a591493b3b8715e1fccdc315667829 (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-ac,v 1.3 2000/08/23 14:46:52 wiz Exp $

--- mit-pthreads/stdio/strerror.c.orig	Mon Aug  8 05:48:21 1994
+++ mit-pthreads/stdio/strerror.c
@@ -36,13 +36,12 @@
 #endif /* LIBC_SCCS and not lint */
 
 #include <string.h>
+#include <errno.h>
 
 char *
 strerror(num)
 	int num;
 {
-	extern int sys_nerr;
-	extern char *sys_errlist[];
 #define	UPREFIX	"Unknown error: "
 	static char ebuf[40] = UPREFIX;		/* 64-bit number + slop */
 	register unsigned int errnum;
@@ -51,7 +50,7 @@
 
 	errnum = num;				/* convert to unsigned */
 	if (errnum < sys_nerr)
-		return(sys_errlist[errnum]);
+		return((char *)sys_errlist[errnum]);
 
 	/* Do this by hand, so we don't include stdio(3). */
 	t = tmp;