nginx_tcp_proxy_module icon indicating copy to clipboard operation
nginx_tcp_proxy_module copied to clipboard

expected specifier-qualifier-list before ‘ngx_resolver_addr_t’

Open reynaldliu opened this issue 9 years ago • 0 comments

addrs的定义文件在nginx/src/core/ngx_resolver.h

nginx_tcp_proxy_module的头文件在ngx_tcp_upstream.h的结构体ngx_tcp_upstream_resolved_s中 这是因为在1.9版本起addrs的结构体由ngx_addr_t 改为ngx_resolver_addr_t,如果只是为了安装1.8上,只要直接将ngx_resolver_addr_t改为ngx_addr_t 即可,如果要兼容所有版本,改为下面的代码

if (nginx_version) >= 1005008

if (nginx_version) >= 1009001

ngx_resolver_addr_t *addrs;

else

ngx_addr_t *addrs;

endif

else

in_addr_t *addrs;

endif

reynaldliu avatar Sep 05 '16 10:09 reynaldliu