php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #71641
Patch 71641-proper-errors-for-getaddrinfo-php55.patch revision 2016-02-22 10:16 UTC by torotil at gmail dot com
revision 2016-02-22 09:57 UTC by torotil at gmail dot com
Patch 7 revision 2016-02-22 10:15 UTC by torotil at gmail dot com

Patch 71641-proper-errors-for-getaddrinfo-php55.patch for Streams related Bug #71641

Patch version 2016-02-22 09:57 UTC

Return to Bug #71641 | Download this patch
This patch is obsolete

Obsoleted by patches:

Patch Revisions: 2016-02-22 10:16 UTC | 2016-02-22 09:57 UTC

Developer: torotil@gmail.com



  diff --git a/main/network.c b/main/network.c
 index 138f86b..235a78d 100644
 index 138f86b..dc33e81 100644
  --- a/main/network.c
  +++ b/main/network.c
  @@ -107,9 +107,9 @@ const struct in6_addr in6addr_any = {0}; /* IN6ADDR_ANY_INIT; */
   
   #if HAVE_GETADDRINFO
   #ifdef HAVE_GAI_STRERROR
  -#  define PHP_GAI_STRERROR(x) (gai_strerror(x))
 +#  define PHP_GAI_STRERROR(x) (x == EAI_SYSTEM ? strerror(errno) : gai_strerror(x))
 +#  define PHP_GAI_STRERROR(x) (x == EIA_SYSTEM ? strerror(errno) : gai_strerror(x))
   #else
  -#  define PHP_GAI_STRERROR(x) (php_gai_strerror(x))
 +#  define PHP_GAI_STRERROR(x) (x == EAI_SYSTEM ? strerror(errno) : php_gai_strerror(x))
 +#  define PHP_GAI_STRERROR(x) (x == EIA_SYSTEM ? strerror(errno) : php_gai_strerror(x))
   /* {{{ php_gai_strerror
    */
   static const char *php_gai_strerror(int code)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 11:01:31 2024 UTC