From 00cf50c68c862a494571c45dc470bb3264c436c5 Mon Sep 17 00:00:00 2001 From: Maxim Dounin Date: Tue, 24 May 2016 17:43:58 +0300 Subject: [PATCH] Fixed build on MSVC. --- src/core/ngx_inet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/ngx_inet.c b/src/core/ngx_inet.c index b5c57b7a4..873bf734a 100644 --- a/src/core/ngx_inet.c +++ b/src/core/ngx_inet.c @@ -590,13 +590,13 @@ ngx_parse_addr_port(ngx_pool_t *pool, ngx_addr_t *addr, u_char *text, #if (NGX_HAVE_INET6) case AF_INET6: sin6 = (struct sockaddr_in6 *) addr->sockaddr; - sin6->sin6_port = htons(port); + sin6->sin6_port = htons((in_port_t) port); break; #endif default: /* AF_INET */ sin = (struct sockaddr_in *) addr->sockaddr; - sin->sin_port = htons(port); + sin->sin_port = htons((in_port_t) port); break; }