Skip to content

compile error: ngx_http_connection_t uses ngx_chain_t instead of ngx_buf_t in nginx1.11.10 #64

@kainswor

Description

@kainswor

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions