Skip to content

Commit a9b4dd6

Browse files
committed
bugfix: compilation error happened with nginx 1.5.3+ because nginx changes the ngx_sock_ntop API. thanks an0ma1ia for the report in FRiCKLE#19.
1 parent 4ab3c76 commit a9b4dd6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/ngx_postgres_upstream.c

+3
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ ngx_postgres_upstream_init(ngx_conf_t *cf, ngx_http_upstream_srv_conf_t *uscf)
103103
}
104104

105105
peers->peer[n].host.len = ngx_sock_ntop(peers->peer[n].sockaddr,
106+
#if defined(nginx_version) && (nginx_version >= 1005003)
107+
peers->peer[n].socklen,
108+
#endif
106109
peers->peer[n].host.data,
107110
NGX_SOCKADDR_STRLEN, 0);
108111
if (peers->peer[n].host.len == 0) {

0 commit comments

Comments
 (0)