PageRenderTime 26ms CodeModel.GetById 0ms RepoModel.GetById 0ms app.codeStats 0ms

/net-misc/iputils/files/iputils-20180629-musl.patch

https://gitlab.com/argent/portage
Patch | 87 lines | 78 code | 9 blank | 0 comment | 0 complexity | e960b253d4396327584d40a75a14d22f MD5 | raw file
  1. commit 5007d7067918fb3d950d34c01d059e5222db679a
  2. Author: Aric Belsito <lluixhi@gmail.com>
  3. AuthorDate: Mon Dec 4 00:10:29 2017 +0100
  4. Commit: Thomas Deutschmann <whissi@gentoo.org>
  5. CommitDate: Wed Jul 11 01:33:28 2018 +0200
  6. Fix build on MUSL
  7. Add missing AI_IDN and NI_IDN declarations.
  8. Bug: https://bugs.gentoo.org/503914
  9. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
  10. diff --git a/arping.c b/arping.c
  11. index c2f2129..d753345 100644
  12. --- a/arping.c
  13. +++ b/arping.c
  14. @@ -44,6 +44,13 @@
  15. #ifdef USE_IDN
  16. #include <locale.h>
  17. +
  18. +#ifndef AI_IDN
  19. +#define AI_IDN 0x0040
  20. +#endif
  21. +#ifndef AI_CANONIDN
  22. +#define AI_CANONIDN 0x0080
  23. +#endif
  24. #endif
  25. #include "SNAPSHOT.h"
  26. diff --git a/ping.h b/ping.h
  27. index 3e09685..1e51c67 100644
  28. --- a/ping.h
  29. +++ b/ping.h
  30. @@ -37,6 +37,17 @@
  31. #ifdef USE_IDN
  32. #include <idn2.h>
  33. +
  34. +#ifndef AI_IDN
  35. +#define AI_IDN 0x0040
  36. +#endif
  37. +#ifndef AI_CANONIDN
  38. +#define AI_CANONIDN 0x0080
  39. +#endif
  40. +#ifndef NI_IDN
  41. +#define NI_IDN 32
  42. +#endif
  43. +
  44. #define getaddrinfo_flags (AI_CANONNAME | AI_IDN | AI_CANONIDN)
  45. #define getnameinfo_flags NI_IDN
  46. #else
  47. diff --git a/tracepath.c b/tracepath.c
  48. index 53bda16..9558e49 100644
  49. --- a/tracepath.c
  50. +++ b/tracepath.c
  51. @@ -29,6 +29,14 @@
  52. #ifdef USE_IDN
  53. #include <locale.h>
  54. +
  55. +#ifndef AI_IDN
  56. +#define AI_IDN 0x0040
  57. +#endif
  58. +#ifndef NI_IDN
  59. +#define NI_IDN 32
  60. +#endif
  61. +
  62. #define getnameinfo_flags NI_IDN
  63. #else
  64. #define getnameinfo_flags 0
  65. diff --git a/traceroute6.c b/traceroute6.c
  66. index a1022f9..ab34615 100644
  67. --- a/traceroute6.c
  68. +++ b/traceroute6.c
  69. @@ -246,6 +246,10 @@
  70. #ifdef USE_IDN
  71. #include <locale.h>
  72. +#ifndef NI_IDN
  73. +#define NI_IDN 32
  74. +#endif
  75. +
  76. #define ADDRINFO_IDN_FLAGS AI_IDN
  77. #define getnameinfo_flags NI_IDN
  78. #else