Fixed build on MSVC.
This commit is contained in:
parent
f4c72efa4c
commit
00cf50c68c
1 changed files with 2 additions and 2 deletions
|
@ -590,13 +590,13 @@ ngx_parse_addr_port(ngx_pool_t *pool, ngx_addr_t *addr, u_char *text,
|
||||||
#if (NGX_HAVE_INET6)
|
#if (NGX_HAVE_INET6)
|
||||||
case AF_INET6:
|
case AF_INET6:
|
||||||
sin6 = (struct sockaddr_in6 *) addr->sockaddr;
|
sin6 = (struct sockaddr_in6 *) addr->sockaddr;
|
||||||
sin6->sin6_port = htons(port);
|
sin6->sin6_port = htons((in_port_t) port);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
default: /* AF_INET */
|
default: /* AF_INET */
|
||||||
sin = (struct sockaddr_in *) addr->sockaddr;
|
sin = (struct sockaddr_in *) addr->sockaddr;
|
||||||
sin->sin_port = htons(port);
|
sin->sin_port = htons((in_port_t) port);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue