Bjarne D Mathiesen wrote:
> fails to build
> 
> hmmm ... it looks af if it's a variation on the same problem as with
> mod_evasive & mod_mono :
> 
> src/mod_cband.c:1333:49: error: no member named 'remote_ip' in 'struct
> conn_rec'
>     p.add.sin.s_addr = inet_addr(r->connection->remote_ip);
>                                  ~~~~~~~~~~~~~  ^
> src/mod_cband.c:1362:12: error: no member named 'remote_ip' in 'struct
> conn_rec'
>     if (c->remote_ip != NULL)
>         ~  ^
> src/mod_cband.c:1363:22: error: no member named 'remote_ip' in 'struct
> conn_rec'
>         addr = inet_addr(c->remote_ip);
>                          ~  ^
> src/mod_cband.c:1365:12: error: no member named 'remote_addr' in 'struct
> conn_rec'
>         addr = c->remote_addr->sa.sin.sin_addr.s_addr;
>                ~  ^

conn_rec->remote_ip and conn_rec->remote_addr
    These fields have been renamed in order to distinguish between the
client IP address of the connection and the useragent IP address of the
request (potentially overridden by a load balancer or proxy). References
to either of these fields must be updated with one of the following
options, as appropriate for the module:
        When you require the IP address of the user agent, which might
be connected directly to the server, or might optionally be separated
from the server by a transparent load balancer or proxy, use
request_rec->useragent_ip and request_rec->useragent_addr.
        When you require the IP address of the client that is connected
directly to the server, which might be the useragent or might be the
load balancer or proxy itself, use conn_rec->client_ip and
conn_rec->client_addr.

-- 
Bjarne D Mathiesen
København N ; Danmark ; Europa
----------------------------------------------------------------------
denne besked er skrevet i et totalt M$-frit miljø
MacOS X 10.7.3 Lion ; 2.8GHz Intel Core i7 ; 16GB 1067MHz DDR3
--- 
/macports/var/macports/sources/rsync.macports.org/release/tarballs/ports/www/mod_cband/Portfile
     2012-04-28 17:43:35.000000000 +0200
+++ portfiles/www/mod_cband/Portfile    2012-04-28 17:43:10.000000000 +0200
@@ -40,6 +40,13 @@
 
 patchfiles          patch-src-mod_cband.h.diff
 
+post-patch {
+    reinplace   "s|->remote_ip|->client_ip|g" \
+                ${worksrcpath}/src/mod_cband.c
+    reinplace   "s|->remote_addr|->client_addr|g" \
+                ${worksrcpath}/src/mod_cband.c
+}
+
 configure.args      --with-apxs=${prefix}/apache2/bin/apxs
 
 build.target        src/.libs/mod_cband.so
_______________________________________________
macports-dev mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev

Reply via email to