Skip to content

Commit

Permalink
fixed compilation error when IPv6 is enabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
cubicdaiya committed Jul 2, 2016
1 parent 6a2ae57 commit cc5dac3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ngx_inet_slab.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,11 @@ ngx_parse_inet6_url(ngx_slab_pool_t *pool, ngx_url_t *u)
return NGX_ERROR;
}

#if (nginx_version < 1011000)
ngx_memcpy(sin6, u->sockaddr, sizeof(struct sockaddr_in6));

#else
ngx_memcpy(sin6, &u->sockaddr, sizeof(struct sockaddr_in6));
#endif
u->addrs[0].sockaddr = (struct sockaddr *) sin6;
u->addrs[0].socklen = sizeof(struct sockaddr_in6);

Expand Down

0 comments on commit cc5dac3

Please sign in to comment.