nbs-system / naxsi

NAXSI is an open-source, high performance, low rules maintenance WAF for NGINX
GNU General Public License v3.0
4.8k stars 606 forks source link

gcc 11 build failed #594

Closed vndroid closed 2 years ago

vndroid commented 2 years ago

Environment

Error

/src/naxsi/naxsi_src/naxsi_runtime.c: In function 'ngx_http_process_basic_rule_buffer':
/src/naxsi/naxsi_src/naxsi_runtime.c:205:61: error: invalid use of incomplete typedef 'ngx_regex_t' {aka 'struct pcre2_real_code_8'}
  205 |       (tmp_idx < len && (match = pcre_exec(rl->br->rx->regex->code,
      |                                                             ^~
/src/naxsi/naxsi_src/naxsi_runtime.c: In function 'ngx_http_naxsi_pcre_wrapper':
/src/naxsi/naxsi_src/naxsi_runtime.c:500:30: error: invalid use of incomplete typedef 'ngx_regex_t' {aka 'struct pcre2_real_code_8'}
  500 |   match = pcre_exec(rx->regex->code, 0, (const char*)str, len, 0, 0, captures, 1);
      |                              ^~
make[1]: *** [objs/Makefile:3170: objs/addon/naxsi_src/naxsi_runtime.o] Error 1
make[1]: Leaving directory '/src/nginx-quic'
make: *** [Makefile:16: modules] Error 2
grazzolini commented 2 years ago

I'm having this exact same issue on Arch.

wargio commented 2 years ago

which version of nginx is this?

grazzolini commented 2 years ago

Latest stable, 1.22.0.

heftig commented 2 years ago

Duplicate of https://github.com/nbs-system/naxsi/issues/580

grazzolini commented 2 years ago

Indeed it is a duplicate of #580.

wargio commented 2 years ago

ok closing this for the other one.