[nginx] Fixed build without IPv6, broken by 874171c3c71a.

Maxim Dounin mdounin at mdounin.ru
Tue Oct 17 13:07:07 UTC 2017


details:   http://hg.nginx.org/nginx/rev/bc902ff79de8
branches:  stable-1.12
changeset: 7148:bc902ff79de8
user:      Maxim Dounin <mdounin at mdounin.ru>
date:      Thu Oct 05 16:50:35 2017 +0300
description:
Fixed build without IPv6, broken by 874171c3c71a.

diffstat:

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

diffs (16 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
@@ -182,9 +182,11 @@ ngx_sock_ntop(struct sockaddr *sa, sockl
     ngx_uint_t port)
 {
     u_char               *p;
+#if (NGX_HAVE_INET6 || NGX_HAVE_UNIX_DOMAIN)
+    size_t                n;
+#endif
     struct sockaddr_in   *sin;
 #if (NGX_HAVE_INET6)
-    size_t                n;
     struct sockaddr_in6  *sin6;
 #endif
 #if (NGX_HAVE_UNIX_DOMAIN)


More information about the nginx-devel mailing list