summaryrefslogtreecommitdiff
path: root/recipes/tcp-wrappers/tcp-wrappers-7.6/have_strerror.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2010-05-26 09:53:08 -0700
committerKhem Raj <raj.khem@gmail.com>2010-05-26 09:56:42 -0700
commit5a12f03c680c41791f7036384fa821fb77991d33 (patch)
tree29db9b97976fa6e4fa6cfe27587386dbfcef51e2 /recipes/tcp-wrappers/tcp-wrappers-7.6/have_strerror.patch
parentfea59d54134947c29e1a8967dd1f4e98d3062b81 (diff)
tcp-wrappers: Add .patch extention to patch files.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'recipes/tcp-wrappers/tcp-wrappers-7.6/have_strerror.patch')
-rw-r--r--recipes/tcp-wrappers/tcp-wrappers-7.6/have_strerror.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/recipes/tcp-wrappers/tcp-wrappers-7.6/have_strerror.patch b/recipes/tcp-wrappers/tcp-wrappers-7.6/have_strerror.patch
new file mode 100644
index 0000000000..31c2b92278
--- /dev/null
+++ b/recipes/tcp-wrappers/tcp-wrappers-7.6/have_strerror.patch
@@ -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 {