Skip to content

Commit

Permalink
bugfix: compilation error happened with nginx 1.5.3+ because nginx ch…
Browse files Browse the repository at this point in the history
…anges the ngx_sock_ntop API. thanks an0ma1ia for the report in FRiCKLE#19.
  • Loading branch information
agentzh committed Jul 31, 2013
1 parent 4ab3c76 commit a9b4dd6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ngx_postgres_upstream.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ ngx_postgres_upstream_init(ngx_conf_t *cf, ngx_http_upstream_srv_conf_t *uscf)
}

peers->peer[n].host.len = ngx_sock_ntop(peers->peer[n].sockaddr,
#if defined(nginx_version) && (nginx_version >= 1005003)
peers->peer[n].socklen,
#endif
peers->peer[n].host.data,
NGX_SOCKADDR_STRLEN, 0);
if (peers->peer[n].host.len == 0) {
Expand Down

0 comments on commit a9b4dd6

Please sign in to comment.