ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nginx-0.4.9



On Mon, 16 Oct 2006, proforg wrote:

не собирается :(

cc1: warnings being treated as errors
src/http/modules/ngx_http_ssi_filter_module.c: In function
'ngx_http_ssi_include':
src/http/modules/ngx_http_ssi_filter_module.c:1950: warning:
dereferencing type-punned pointer will break strict-aliasing rules
make[1]: *** [objs/src/http/modules/ngx_http_ssi_filter_module.o] Ошибка 1
make[1]: Leaving directory `/usr/local/src/nginx-0.4.9'
make: *** [build] Ошибка 2

gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-mpfr --enable-checking=release
x86_64-linux-gnu
Thread model: posix
gcc version 4.1.2 20060814 (prerelease) (Debian 4.1.1-11)

Патч.


Игорь Сысоев
http://sysoev.ru
Index: src/http/modules/ngx_http_ssi_filter_module.c
===================================================================
--- src/http/modules/ngx_http_ssi_filter_module.c       (revision 103)
+++ src/http/modules/ngx_http_ssi_filter_module.c       (working copy)
@@ -1843,7 +1843,7 @@
     ngx_str_t                   *uri, *file, *wait, *set, *stub, args;
     ngx_buf_t                   *b;
     ngx_uint_t                   flags, i;
-    ngx_chain_t                 *cl, *tl, **ll;
+    ngx_chain_t                 *cl, *tl, **ll, *out;
     ngx_http_request_t          *sr;
     ngx_http_ssi_var_t          *var;
     ngx_http_ssi_ctx_t          *mctx;
@@ -1947,7 +1947,7 @@
 
         if (bl[i].count++) {
 
-            ll = (ngx_chain_t **) &psr->data;
+            ll = &out;
 
             for (tl = bl[i].bufs; tl; tl = tl->next) {
 
@@ -1979,6 +1979,8 @@
                 ll = &cl->next;
             }
 
+            psr->data = out;
+
         } else {
             psr->data = bl[i].bufs;
         }


 




Copyright © Lexa Software, 1996-2009.