Fixed build on MSVC.

This commit is contained in:
Maxim Dounin 2016-05-24 17:43:58 +03:00
parent f4c72efa4c
commit 00cf50c68c

View file

@ -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;
} }