have_strerror 563 B

1234567891011121314151617181920
  1. diff -ruN tcp_wrappers_7.6.orig/percent_m.c tcp_wrappers_7.6/percent_m.c
  2. --- tcp_wrappers_7.6.orig/percent_m.c 1994-12-28 17:42:37.000000000 +0100
  3. +++ tcp_wrappers_7.6/percent_m.c 2003-08-21 02:45:31.000000000 +0200
  4. @@ -29,11 +29,15 @@
  5. while (*bp = *cp)
  6. if (*cp == '%' && cp[1] == 'm') {
  7. +#ifdef HAVE_STRERROR
  8. + strcpy(bp, strerror(errno));
  9. +#else
  10. if (errno < sys_nerr && errno > 0) {
  11. strcpy(bp, sys_errlist[errno]);
  12. } else {
  13. sprintf(bp, "Unknown error %d", errno);
  14. }
  15. +#endif
  16. bp += strlen(bp);
  17. cp += 2;
  18. } else {