PageRenderTime 60ms CodeModel.GetById 33ms RepoModel.GetById 0ms app.codeStats 0ms

/apps/net/traceroute/traceroute-2.0.3-diet.patch

https://github.com/tenchman/TTLinux
Patch | 72 lines | 64 code | 8 blank | 0 comment | 0 complexity | bac5997c4f13535d1d5993d01ad54557 MD5 | raw file
  1. --- traceroute-2.0.3/traceroute/traceroute.c.diet 2007-01-09 13:37:54.000000000 +0100
  2. +++ traceroute-2.0.3/traceroute/traceroute.c 2007-05-14 17:27:19.000000000 +0200
  3. @@ -29,7 +29,9 @@
  4. #include <linux/errqueue.h>
  5. /* XXX: Remove this when things will be defined properly in netinet/ ... */
  6. +#ifndef __dietlibc__
  7. #include "flowlabel.h"
  8. +#endif
  9. #include <clif.h>
  10. #include "version.h"
  11. @@ -48,6 +50,9 @@
  12. #define IPV6_RECVHOPLIMIT IPV6_HOPLIMIT
  13. #endif
  14. +#ifndef IPV6_RTHDR_TYPE_0
  15. +#define IPV6_RTHDR_TYPE_0 0
  16. +#endif
  17. #define MAX_HOPS 255
  18. #define MAX_PROBES 10
  19. @@ -159,7 +164,9 @@
  20. memset (&hints, 0, sizeof (hints));
  21. hints.ai_family = af;
  22. +#ifndef __dietlibc__
  23. hints.ai_flags = AI_IDN;
  24. +#endif
  25. ret = getaddrinfo (name, NULL, &hints, &res);
  26. if (ret) {
  27. @@ -613,8 +620,13 @@
  28. char buf[1024];
  29. buf[0] = '\0';
  30. +#ifndef __dietlibc__
  31. getnameinfo (&res->sa, sizeof (*res), buf, sizeof (buf),
  32. 0, 0, NI_IDN);
  33. +#else
  34. + getnameinfo (&res->sa, sizeof (*res), buf, sizeof (buf),
  35. + 0, 0, 0);
  36. +#endif
  37. /* foo on errors. */
  38. printf (" %s (%s)", buf, str);
  39. --- traceroute-2.0.3/include/linux/errqueue.h.diet 2007-05-14 17:12:35.000000000 +0200
  40. +++ traceroute-2.0.3/include/linux/errqueue.h 2007-05-14 17:11:16.000000000 +0200
  41. @@ -0,0 +1,23 @@
  42. +#ifndef _LINUX_ERRQUEUE_H
  43. +#define _LINUX_ERRQUEUE_H 1
  44. +
  45. +struct sock_extended_err
  46. +{
  47. + __u32 ee_errno;
  48. + __u8 ee_origin;
  49. + __u8 ee_type;
  50. + __u8 ee_code;
  51. + __u8 ee_pad;
  52. + __u32 ee_info;
  53. + __u32 ee_data;
  54. +};
  55. +
  56. +#define SO_EE_ORIGIN_NONE 0
  57. +#define SO_EE_ORIGIN_LOCAL 1
  58. +#define SO_EE_ORIGIN_ICMP 2
  59. +#define SO_EE_ORIGIN_ICMP6 3
  60. +
  61. +#define SO_EE_OFFENDER(ee) ((struct sockaddr*)((ee)+1))
  62. +
  63. +
  64. +#endif