Description
After:
git clone --depth 1 https://github.com/SpiderLabs/ModSecurity-nginx.git
wget http://nginx.org/download/nginx-1.21.5.tar.gz
tar zxf nginx-1.21.5.tar.gz
cd nginx-1.21.5
./configure --with-compat --add-dynamic-module=../ModSecurity-nginx
make modules
I can see this error:
make -f objs/Makefile modules
make[1]: Entering directory '/root/nginx-1.21.5'
cc -c -fPIC -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/local/modsecurity/include -I objs -I src/http -I src/http/modules
-o objs/addon/src/ngx_http_modsecurity_module.o
../ModSecurity-nginx/src/ngx_http_modsecurity_module.c
../ModSecurity-nginx/src/ngx_http_modsecurity_module.c: In function 'ngx_http_modsecurity_pcre_malloc_init':
../ModSecurity-nginx/src/ngx_http_modsecurity_module.c:78:9: error: 'pcre_malloc' undeclared (first use in this function); did you mean 'old_pcre_malloc'?
78 | if (pcre_malloc != ngx_http_modsec_pcre_malloc) {
| ^~~~~~~~~~~
| old_pcre_malloc
../ModSecurity-nginx/src/ngx_http_modsecurity_module.c:78:9: note: each undeclared identifier is reported only once for each function it appears in
../ModSecurity-nginx/src/ngx_http_modsecurity_module.c:82:25: error: 'pcre_free' undeclared (first use in this function); did you mean 'pkey_free'?
82 | old_pcre_free = pcre_free;
| ^~~~~~~~~
| pkey_free
../ModSecurity-nginx/src/ngx_http_modsecurity_module.c: In function 'ngx_http_modsecurity_pcre_malloc_done':
../ModSecurity-nginx/src/ngx_http_modsecurity_module.c:102:9: error: 'pcre_malloc' undeclared (first use in this function); did you mean 'old_pcre_malloc'?
102 | pcre_malloc = old_pcre_malloc;
| ^~~~~~~~~~~
| old_pcre_malloc
../ModSecurity-nginx/src/ngx_http_modsecurity_module.c:103:9: error: 'pcre_free' undeclared (first use in this function); did you mean 'pkey_free'?
103 | pcre_free = old_pcre_free;
| ^~~~~~~~~
| pkey_free
make[1]: *** [objs/Makefile:1232: objs/addon/src/ngx_http_modsecurity_module.o] Error 1