mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Sync HAVE_IPV6 and HAVE_GETADDRINFO in #if/ifdef/defined (#14341)
Follow up of GH-5526 (-Wundef)
This commit is contained in:
parent
5109cf1010
commit
2d66562e4b
7 changed files with 24 additions and 24 deletions
|
@ -1302,7 +1302,7 @@ static php_socket_t php_network_listen_socket(const char *host, int *port, int s
|
|||
}
|
||||
|
||||
switch ((*p)->sa_family) {
|
||||
#if HAVE_GETADDRINFO && HAVE_IPV6
|
||||
#if defined(HAVE_GETADDRINFO) && defined(HAVE_IPV6)
|
||||
case AF_INET6:
|
||||
sa = pemalloc(sizeof(struct sockaddr_in6), 1);
|
||||
*(struct sockaddr_in6 *)sa = *(struct sockaddr_in6 *)*p;
|
||||
|
@ -1348,7 +1348,7 @@ static php_socket_t php_network_listen_socket(const char *host, int *port, int s
|
|||
goto out;
|
||||
}
|
||||
switch (sa->sa_family) {
|
||||
#if HAVE_GETADDRINFO && HAVE_IPV6
|
||||
#if defined(HAVE_GETADDRINFO) && defined(HAVE_IPV6)
|
||||
case AF_INET6:
|
||||
*port = ntohs(((struct sockaddr_in6 *)sa)->sin6_port);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue