[nginx] Fixed build on MSVC.

Maxim Dounin mdounin at mdounin.ru
Tue May 24 14:47:56 UTC 2016


details:   http://hg.nginx.org/nginx/rev/5d8f16859ced
branches:  
changeset: 6567:5d8f16859ced
user:      Maxim Dounin <mdounin at mdounin.ru>
date:      Tue May 24 17:43:58 2016 +0300
description:
Fixed build on MSVC.

diffstat:

 src/core/ngx_inet.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (19 lines):

diff --git a/src/core/ngx_inet.c b/src/core/ngx_inet.c
--- a/src/core/ngx_inet.c
+++ b/src/core/ngx_inet.c
@@ -590,13 +590,13 @@ ngx_parse_addr_port(ngx_pool_t *pool, ng
 #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;
     }
 



More information about the nginx-devel mailing list