在編譯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);
然後可以了.