tcp_wrappers/tcp_wrappers-7.6-strerror.patch
cvsdist f791644d6d auto-import changelog data from tcp_wrappers-7.6-34.src.rpm
Sun Feb 16 2003 Florian La Roche <Florian.LaRoche@redhat.de>
- use strerror #84312
Tue Feb 11 2003 Harald Hoyer <harald@redhat.de> 7.6-33
- revert Nalins weak version
- link libwrap.so against libnsl, on which it depends
Mon Feb 10 2003 Nalin Dahyabhai <nalin@redhat.com> 7.6-32
- link libwrap.so against libnsl, on which it depends
- add default (weak) versions of allow_severity and deny_severity to the
    shared library so that configure tests can find it correctly
Mon Feb 10 2003 Harald Hoyer <harald@redhat.de> 7.6-29
- shared library generated and added #75494
- added security patch tcp_wrappers-7.6-sig.patch
- compile and link with -fPIC -DPIC
Wed Jan 22 2003 Tim Powers <timp@redhat.com>
- rebuilt
Tue Jan 07 2003 Jeff Johnson <jbj@redhat.com> 7.6-25
- don't include -debuginfo files in package.
Tue Nov 19 2002 Tim Powers <timp@redhat.com>
- rebuild on all arches
2004-09-09 13:07:52 +00:00

28 lines
630 B
Diff

--- tcp-wrappers-7.6/percent_m.c
+++ tcp-wrappers-7.6/percent_m.c
@@ -13,7 +13,7 @@
#include <string.h>
extern int errno;
-#ifndef SYS_ERRLIST_DEFINED
+#if !defined(SYS_ERRLIST_DEFINED) && !defined(HAVE_STRERROR)
extern char *sys_errlist[];
extern int sys_nerr;
#endif
@@ -29,11 +29,15 @@
while (*bp = *cp)
if (*cp == '%' && cp[1] == 'm') {
+#ifdef HAVE_STRERROR
+ strcpy(bp, strerror(errno));
+#else
if (errno < sys_nerr && errno > 0) {
strcpy(bp, sys_errlist[errno]);
} else {
sprintf(bp, "Unknown error %d", errno);
}
+#endif
bp += strlen(bp);
cp += 2;
} else {