cnken / substitutions4nginx

Automatically exported from code.google.com/p/substitutions4nginx
3 stars 3 forks source link

Error compiling with nginx-1.1.12 #11

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
when i compiled nginx using the following options:

./configure --user=www --group=www --prefix=/usr/local/nginx 
--with-http_stub_status_module --with-http_ssl_module 
--with-http_gzip_static_module --with-ipv6 --with-http_sub_module 
--add-module=/root/substitutions4nginx-read-only 
--add-module=/root/nginx-accesskey-2.0.3 --with-pcre

there's something wrong while making:

/root/substitutions4nginx-read-only/ngx_http_subs_filter_module.c:1306: 
warning: passing argument 1 of  pcre_fullinfo  from incompatible pointer type
make[1]: *** 
[objs/addon/substitutions4nginx-read-only/ngx_http_subs_filter_module.o] Error 1
make[1]: Leaving directory `/root/nginx-1.1.12'
make: *** [build] Error 2

the following codes should have some problems.

#if defined(nginx_version) && nginx_version >= 1001012
    rc = pcre_fullinfo(re->pcre, NULL, PCRE_INFO_CAPTURECOUNT, &n);
#else
    rc = pcre_fullinfo(re, NULL, PCRE_INFO_CAPTURECOUNT, &n);
#endif

i used

rc = pcre_fullinfo(re->pcre, NULL, PCRE_INFO_CAPTURECOUNT, &n);

instead and successfully compiled.

Original issue reported on code.google.com by qiy...@gmail.com on 5 Jan 2012 at 5:07

GoogleCodeExporter commented 9 years ago
Yes. You are right. But the macro of 'nginx_version' in nginx-1.1.12 is 
incorrect. It's still nginx-1.1.11's.

So, you can use my module below nginx-1.1.12, or above nginx-1.1.12, just not 
the nginx-1.1.12.

It sucks. Is it?

Original comment by nbubi...@gmail.com on 5 Jan 2012 at 5:12