diff options
author | bouyer <bouyer> | 2004-03-21 19:49:05 +0000 |
---|---|---|
committer | bouyer <bouyer> | 2004-03-21 19:49:05 +0000 |
commit | 59f2528058e8a80262b85c008cc4f0e27ac206a3 (patch) | |
tree | 5f3bdb8d0ee52c742c39c9ca3e1d0a03dac7f47c /security/tcp_wrappers/patches | |
parent | eb2e4965d31cd0a2ed877113e3c85fc73f4d63ab (diff) | |
download | pkgsrc-59f2528058e8a80262b85c008cc4f0e27ac206a3.tar.gz |
Use strerror() instead of sys_errlist[], as the later isn't available on
solaris9. OK'd by tron@
Diffstat (limited to 'security/tcp_wrappers/patches')
-rw-r--r-- | security/tcp_wrappers/patches/patch-ac | 28 | ||||
-rw-r--r-- | security/tcp_wrappers/patches/patch-ad | 28 | ||||
-rw-r--r-- | security/tcp_wrappers/patches/patch-ae | 28 |
3 files changed, 84 insertions, 0 deletions
diff --git a/security/tcp_wrappers/patches/patch-ac b/security/tcp_wrappers/patches/patch-ac new file mode 100644 index 00000000000..74df4c538a2 --- /dev/null +++ b/security/tcp_wrappers/patches/patch-ac @@ -0,0 +1,28 @@ +$NetBSD: patch-ac,v 1.1 2004/03/21 19:49:05 bouyer Exp $ + +--- tli-sequent.c.orig Thu Feb 5 11:40:42 2004 ++++ tli-sequent.c Thu Feb 5 11:43:16 2004 +@@ -31,8 +31,6 @@ + #include <string.h> + + extern int errno; +-extern char *sys_errlist[]; +-extern int sys_nerr; + extern int t_errno; + extern char *t_errlist[]; + extern int t_nerr; +@@ -157,12 +155,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); + } + } + diff --git a/security/tcp_wrappers/patches/patch-ad b/security/tcp_wrappers/patches/patch-ad new file mode 100644 index 00000000000..6c45c18ac0a --- /dev/null +++ b/security/tcp_wrappers/patches/patch-ad @@ -0,0 +1,28 @@ +$NetBSD: patch-ad,v 1.1 2004/03/21 19:49:05 bouyer Exp $ + +--- percent_m.c.orig Thu Feb 5 11:40:42 2004 ++++ percent_m.c Thu Feb 5 11:44:20 2004 +@@ -13,10 +13,6 @@ + #include <string.h> + + extern int errno; +-#ifndef SYS_ERRLIST_DEFINED +-extern char *sys_errlist[]; +-extern int sys_nerr; +-#endif + + #include "mystdarg.h" + +@@ -29,11 +25,7 @@ + + while (*bp = *cp) + if (*cp == '%' && cp[1] == 'm') { +- if (errno < sys_nerr && errno > 0) { +- strcpy(bp, sys_errlist[errno]); +- } else { +- sprintf(bp, "Unknown error %d", errno); +- } ++ strcpy(bp, strerror(errno)); + bp += strlen(bp); + cp += 2; + } else { diff --git a/security/tcp_wrappers/patches/patch-ae b/security/tcp_wrappers/patches/patch-ae new file mode 100644 index 00000000000..3b0e3a2a3aa --- /dev/null +++ b/security/tcp_wrappers/patches/patch-ae @@ -0,0 +1,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); + } + } + |