chobits / ngx_http_proxy_connect_module

A forward proxy module for CONNECT request handling
BSD 2-Clause "Simplified" License
1.84k stars 498 forks source link

report bug:src/http/ngx_http_request.h:47: error: "NGX_HTTP_CONNECT" redefined [-Werror],when excute "make".In nginx 1.23.1 #231

Closed L2421800049 closed 2 years ago

L2421800049 commented 2 years ago

src/http/ngx_http_request.h:47: error: "NGX_HTTP_CONNECT" redefined [-Werror],when excute "make".In nginx 1.23.1.

logs:

In file included from src/http/ngx_http.h:32, from src/http/ngx_http.c:10: src/http/ngx_http_request.h:47: error: "NGX_HTTP_CONNECT" redefined [-Werror]

define NGX_HTTP_CONNECT 0x10000

src/http/ngx_http_request.h:44: note: this is the location of the previous definition

define NGX_HTTP_CONNECT 0x00010000

cc1: all warnings being treated as errors make[1]: [objs/Makefile:922: objs/src/http/ngx_http.o] Error 1 make[1]: Leaving directory '/opt/nginx' make: [Makefile:10: build] Error 2

chobits commented 2 years ago

which patch do you use?

This problem is caused by old patch you used, which defined NGX_HTTP_CONNECT macro while your new nginx has this macro in nginx core sourse already.

Select right patch from this doc:https://github.com/chobits/ngx_http_proxy_connect_module#select-patch

chobits commented 2 years ago

All patch files has been included in patch/ directory of this module.