summaryrefslogtreecommitdiff
path: root/packages/tcp-wrappers/tcp-wrappers-7.6/have_strerror
diff options
context:
space:
mode:
Diffstat (limited to 'packages/tcp-wrappers/tcp-wrappers-7.6/have_strerror')
-rw-r--r--packages/tcp-wrappers/tcp-wrappers-7.6/have_strerror19
1 files changed, 19 insertions, 0 deletions
diff --git a/packages/tcp-wrappers/tcp-wrappers-7.6/have_strerror b/packages/tcp-wrappers/tcp-wrappers-7.6/have_strerror
index e69de29bb2..31c2b92278 100644
--- a/packages/tcp-wrappers/tcp-wrappers-7.6/have_strerror
+++ b/packages/tcp-wrappers/tcp-wrappers-7.6/have_strerror
@@ -0,0 +1,19 @@
+diff -ruN tcp_wrappers_7.6.orig/percent_m.c tcp_wrappers_7.6/percent_m.c
+--- tcp_wrappers_7.6.orig/percent_m.c 1994-12-28 17:42:37.000000000 +0100
++++ tcp_wrappers_7.6/percent_m.c 2003-08-21 02:45:31.000000000 +0200
+@@ -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 {