nginx_tcp_proxy_module icon indicating copy to clipboard operation
nginx_tcp_proxy_module copied to clipboard

nginx 1.8.1 编译失败

Open forestpro opened this issue 9 years ago • 1 comments

/home/triploc/nginx_tcp_proxy_module-master/ngx_tcp_upstream.h:143: 错误:expected specifier-qualifier-list before ‘ngx_resolver_addr_t’ make[1]: *** [objs/addon/nginx_tcp_proxy_module-master/ngx_tcp.o] 错误 1

forestpro avatar Aug 24 '16 08:08 forestpro

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