OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.3 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../tcp_wrappers/0017-tcp_wrappers-7.6-have-strerror.patch
  5. # Copyright (C) 2011 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. diff -ruN tcp_wrappers_7.6.orig/percent_m.c tcp_wrappers_7.6/percent_m.c
  17. --- tcp_wrappers_7.6.orig/percent_m.c 1994-12-28 17:42:37.000000000 +0100
  18. +++ tcp_wrappers_7.6/percent_m.c 2003-08-21 02:45:31.000000000 +0200
  19. @@ -29,11 +29,15 @@
  20. while (*bp = *cp)
  21. if (*cp == '%' && cp[1] == 'm') {
  22. +#ifdef HAVE_STRERROR
  23. + strcpy(bp, strerror(errno));
  24. +#else
  25. if (errno < sys_nerr && errno > 0) {
  26. strcpy(bp, sys_errlist[errno]);
  27. } else {
  28. sprintf(bp, "Unknown error %d", errno);
  29. }
  30. +#endif
  31. bp += strlen(bp);
  32. cp += 2;
  33. } else {