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.

58 lines
1.9 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../tcp_wrappers/0026-tcp_wrappers-7.6-size_t.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/fix_options.c tcp_wrappers_7.6/fix_options.c
  17. --- tcp_wrappers_7.6.orig/fix_options.c 2003-08-21 03:41:33.000000000 +0200
  18. +++ tcp_wrappers_7.6/fix_options.c 2003-08-21 03:41:27.000000000 +0200
  19. @@ -38,7 +38,11 @@
  20. #ifdef IP_OPTIONS
  21. unsigned char optbuf[BUFFER_SIZE / 3], *cp;
  22. char lbuf[BUFFER_SIZE], *lp;
  23. +#ifdef __GLIBC__
  24. + size_t optsize = sizeof(optbuf), ipproto;
  25. +#else
  26. int optsize = sizeof(optbuf), ipproto;
  27. +#endif
  28. struct protoent *ip;
  29. int fd = request->fd;
  30. unsigned int opt;
  31. diff -ruN tcp_wrappers_7.6.orig/socket.c tcp_wrappers_7.6/socket.c
  32. --- tcp_wrappers_7.6.orig/socket.c 2003-08-21 03:41:33.000000000 +0200
  33. +++ tcp_wrappers_7.6/socket.c 2003-08-21 03:40:51.000000000 +0200
  34. @@ -90,7 +90,11 @@
  35. static struct sockaddr_in client;
  36. static struct sockaddr_in server;
  37. #endif
  38. +#ifdef __GLIBC__
  39. + size_t len;
  40. +#else
  41. int len;
  42. +#endif
  43. char buf[BUFSIZ];
  44. int fd = request->fd;
  45. @@ -421,7 +425,11 @@
  46. #else
  47. struct sockaddr_in sin;
  48. #endif
  49. +#ifdef __GLIBC__
  50. + size_t size = sizeof(sin);
  51. +#else
  52. int size = sizeof(sin);
  53. +#endif
  54. /*
  55. * Eat up the not-yet received datagram. Some systems insist on a