Closed rickygm closed 4 years ago
how are you compiling it? the easiest way to fix this is to add -std=c99
to the CFLAGS, or just move size_t i
outside the for loop.
@rickygm you can use master if you want. i just added a commit to fix this.
OK , let me try
ready , the master is version 1.1a?
yes. it was before my fix for your issue.
oki oki
Hi, I am trying to compile this latest version with nginx 1.18
/rpm/naxsi-1.1a/naxsi_src/naxsi_runtime.c: In function ‘ngx_http_output_forbidden_page’: /rpm/naxsi-1.1a/naxsi_src/naxsi_runtime.c:1279:7: error: ‘for’ loop initial declarations are only allowed in C99 mode for (size_t i = 0; line[i] && curr < end; i++) { ^ /rpm/naxsi-1.1a/naxsi_src/naxsi_runtime.c:1279:7: note: use option -std=c99 or -std=gnu99 to compile your code make[1]: [objs/addon/naxsi_src/naxsi_runtime.o] Error 1 make[1]: Leaving directory `/rpm/nginx-1.18.0' make: [build] Error 2
any idea?