diff options
Diffstat (limited to 'src/http/ngx_http.c')
-rw-r--r-- | src/http/ngx_http.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c index 2ada19171..08958141a 100644 --- a/src/http/ngx_http.c +++ b/src/http/ngx_http.c @@ -483,6 +483,9 @@ static char *ngx_http_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) ngx_pcalloc(cf->pool, sizeof(struct sockaddr_in)), NGX_CONF_ERROR); +#if (HAVE_SIN_LEN) + addr_in->sin_len = sizeof(struct sockaddr_in); +#endif addr_in->sin_family = AF_INET; addr_in->sin_addr.s_addr = in_addr[a].addr; addr_in->sin_port = htons((u_short) in_port[p].port); |