Skip to content
Browse files

bugfix: compilation error happened with nginx 1.5.3+ because nginx ch…

…anges the ngx_sock_ntop API. thanks an0ma1ia for the report in #19.
  • Loading branch information...
1 parent 4ab3c76 commit a9b4dd6ba99cbdece46f2e2d79628cdef1795183 @agentzh agentzh committed Jul 31, 2013
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/ngx_postgres_upstream.c
View
3 src/ngx_postgres_upstream.c
@@ -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) {

0 comments on commit a9b4dd6

Please sign in to comment.
Something went wrong with that request. Please try again.