echo-nginx-module: compile error: ngx_http_connection_t uses ngx_chain_t instead of ngx_buf_t in nginx1.11.10
I haven’t tried with other versions between 1.11.2 (which is the latest version shown in the compatibility section). When we tried to build a package with this included we got:
./modules/echo-nginx-module/src/ngx_http_echo_request_info.c: In function ‘ngx_http_echo_client_request_headers_variable’:
./modules/echo-nginx-module/src/ngx_http_echo_request_info.c:219:15: error: incompatible types when assigning to type ‘ngx_buf_t * {aka struct ngx_buf_s *}’ from type ‘ngx_chain_t {aka struct ngx_chain_s}’
b = hc->busy[i];
^
./modules/echo-nginx-module/src/ngx_http_echo_request_info.c:284:15: error: incompatible types when assigning to type ‘ngx_buf_t * {aka struct ngx_buf_s *}’ from type ‘ngx_chain_t {aka struct ngx_chain_s}’
b = hc->busy[i];
^
objs/Makefile:1849: recipe for target 'objs/addon/src/ngx_http_echo_request_info.o' failed
make: *** [objs/addon/src/ngx_http_echo_request_info.o] Error 1
It seems like they changed it to use an ngx_chain_t instead of an array of buffers https://github.com/openresty/echo-nginx-module/blob/master/src/ngx_http_echo_request_info.c#L180 https://github.com/nginx/nginx/blob/fca26c2e53d46549320a3b23ce0398c5921348dd/src/http/ngx_http_request.h#L312
I think it’s probably as straightforward as changing the type based on NGINX version, but I wasn’t sure if there was more going on there.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 5
- Comments: 21 (5 by maintainers)
Commits related to this issue
- fixed build with nginx/1.11.11 Closes openresty/echo-nginx-module#64 See also: http://hg.nginx.org/nginx/rev/e662cbf1b932 — committed to defanator/echo-nginx-module by defanator 7 years ago
- * Updated nginx to 1.13.3 * Update nginx-lua: v0.10.7 -> v0.10.9rc8 + https://github.com/openresty/lua-nginx-module/issues/1016 * Update headers-more-nginx-module: v0.25 -> v0.32 * Update ... — committed to researchgate/nginx by deleted user 7 years ago
Facing same issue on nginx-1.12.0
/home/buildozer/aports/main/nginx/src/echo-nginx-module-0.60/src/ngx_http_echo_request_info.c: In function 'ngx_http_echo_client_request_headers_variable': /home/buildozer/aports/main/nginx/src/echo-nginx-module-0.60/src/ngx_http_echo_request_info.c:219:15: error: incompatible types when assigning to type 'ngx_buf_t * {aka struct ngx_buf_s *}' from type 'ngx_chain_t {aka struct ngx_chain_s}' b = hc->busy[i]; ^ /home/buildozer/aports/main/nginx/src/echo-nginx-module-0.60/src/ngx_http_echo_request_info.c:284:15: error: incompatible types when assigning to type 'ngx_buf_t * {aka struct ngx_buf_s *}' from type 'ngx_chain_t {aka struct ngx_chain_s}' b = hc->busy[i]; ^@i300220 you can use defanator fork as referenced above until openresty accepts the pull req