天天看点

解决Mod_wsgi模块的编译错误

在编译nginx的mod_wsgi模块时, 会碰到一个错误. cc1: warnings being treated as errors ../mod_wsgi/src/ngx_http_wsgi_module.c: In function ‘ngx_http_wsgi_handler’: ../mod_wsgi/src/ngx_http_wsgi_module.c:624: warning: implicit declaration of function ‘ngx_http_discard_body’ make[1]: *** [objs/addon/src/ngx_http_wsgi_module.o] Error 1

原因是Nginx在升级的时候, 修改了一个接口的函数名. 修改: ngx_http_wsgi_module.c 624行: - rc = ngx_http_discard_body(r); +rc = ngx_http_discard_request_body(r);

然后可以了.

继续阅读