- vendorarch/Apache belongs to perl-dirs now
[packages/apache1-mod_perl.git] / mod_perl-v6.patch
CommitLineData
b15e4fc5
JR
1--- mod_perl-1.24/src/modules/perl/Connection.xs.v6 Tue Apr 11 09:49:19 2000
2+++ mod_perl-1.24/src/modules/perl/Connection.xs Fri Nov 3 08:29:29 2000
3@@ -78,7 +78,7 @@
4 RETVAL = newSVpv((char *)&conn->remote_addr,
5 sizeof conn->remote_addr);
6 if(sv_addr) {
7- struct sockaddr_in addr;
8+ struct sockaddr_storage addr;
9 STRLEN sockaddrlen;
10 char * new_addr = SvPV(sv_addr,sockaddrlen);
11 if (sockaddrlen != sizeof(addr)) {
12@@ -106,7 +106,18 @@
13 #else
14 conn->remote_ip = pstrdup(conn->pool, (char *)SvPV(ST(1),na));
15 #endif
16- conn->remote_addr.sin_addr.s_addr = inet_addr(conn->remote_ip);
17+ switch(conn->remote_addr.ss_family)
18+ {
19+ case AF_INET:
d1042a02 20+ inet_pton(AF_INET, conn->remote_ip, &((struct sockaddr_in*)&conn->remote_addr)->sin_addr.s_addr);
b15e4fc5
JR
21+ break;
22+ case AF_INET6:
23+ inet_pton(AF_INET6, conn->remote_ip, ((struct sockaddr_in6*)&conn->remote_addr)->sin6_addr.s6_addr);
24+ break;
25+ default:
26+ croak("Apache doesn't support this address family\n");
27+ break;
28+ }
29 }
30
31 OUTPUT:
This page took 0.048278 seconds and 4 git commands to generate.