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

/package/uclibc/0001-include-netdb.h-Do-not-define-IDN-related-flags.patch

https://gitlab.com/hacktown/reflexio-buildroot
Patch | 54 lines | 47 code | 7 blank | 0 comment | 0 complexity | f93ae70544a1afe7b8a1e47bfd34b7d0 MD5 | raw file
  1. From 5e9a78c8a839381add6faa61e196e6dad9143163 Mon Sep 17 00:00:00 2001
  2. From: Thomas Claveirole <thomas.claveirole@green-communications.fr>
  3. Date: Tue, 2 Feb 2016 12:13:09 +0100
  4. Subject: [PATCH] include/netdb.h: Do not define IDN-related flags.
  5. getaddrinfo() does not implement IDN encoding, and always fail when
  6. provided an IDN flag (e.g., AI_IDN) with EAI_BADFLAGS. Some packages
  7. (such as the VLC media player) check for AI_IDN before they use it;
  8. providing an unimplemented AI_IDN in the libc makes these package
  9. fail. As a result they make calls to getaddrinfo() with AI_IDN that
  10. always fail while they could have made successful calls without AI_IDN
  11. instead.
  12. Thus, do not define IDN flags: it is better not to compile rather than
  13. to compile a code that always fail.
  14. Signed-off-by: Thomas Claveirole <thomas.claveirole@green-communications.fr>
  15. Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
  16. ---
  17. include/netdb.h | 11 -----------
  18. 1 file changed, 11 deletions(-)
  19. diff --git a/include/netdb.h b/include/netdb.h
  20. index a636b5f..95abe95 100644
  21. --- a/include/netdb.h
  22. +++ b/include/netdb.h
  23. @@ -627,16 +627,6 @@ struct addrinfo
  24. # define AI_ALL 0x0010 /* Return IPv4 mapped and IPv6 addresses. */
  25. # define AI_ADDRCONFIG 0x0020 /* Use configuration of this host to choose
  26. returned address type.. */
  27. -# ifdef __USE_GNU
  28. -# define AI_IDN 0x0040 /* IDN encode input (assuming it is encoded
  29. - in the current locale's character set)
  30. - before looking it up. */
  31. -# define AI_CANONIDN 0x0080 /* Translate canonical name from IDN format. */
  32. -# define AI_IDN_ALLOW_UNASSIGNED 0x0100 /* Don't reject unassigned Unicode
  33. - code points. */
  34. -# define AI_IDN_USE_STD3_ASCII_RULES 0x0200 /* Validate strings according to
  35. - STD3 rules. */
  36. -# endif
  37. # define AI_NUMERICSERV 0x0400 /* Don't use name resolution. */
  38. /* Error values for `getaddrinfo' function. */
  39. @@ -658,7 +648,6 @@ struct addrinfo
  40. # define EAI_NOTCANCELED -102 /* Request not canceled. */
  41. # define EAI_ALLDONE -103 /* All requests done. */
  42. # define EAI_INTR -104 /* Interrupted by a signal. */
  43. -# define EAI_IDN_ENCODE -105 /* IDN encoding failed. */
  44. # endif
  45. # ifdef __USE_MISC
  46. --
  47. 1.7.10.4