diff options
author | martti <martti> | 2001-11-23 10:52:23 +0000 |
---|---|---|
committer | martti <martti> | 2001-11-23 10:52:23 +0000 |
commit | 4fb9f9a2c44e5a1069682357889657d6ee96f63f (patch) | |
tree | 5e5d08da80d750287ffb70e6fffd4b7c7e50d2a4 /www | |
parent | aeff7beac440e81dcf15aff69939d7065ad7eaaf (diff) | |
download | pkgsrc-4fb9f9a2c44e5a1069682357889657d6ee96f63f.tar.gz |
Make this work with apache6 (patch provided by Tero Kivinen).
This is part 2 of 2 to fix PR#14693 by Tero Kivinen
Diffstat (limited to 'www')
-rw-r--r-- | www/ap-perl/distinfo | 3 | ||||
-rw-r--r-- | www/ap-perl/patches/patch-ab | 43 |
2 files changed, 45 insertions, 1 deletions
diff --git a/www/ap-perl/distinfo b/www/ap-perl/distinfo index bcbc1653408..7c840a7a29e 100644 --- a/www/ap-perl/distinfo +++ b/www/ap-perl/distinfo @@ -1,5 +1,6 @@ -$NetBSD: distinfo,v 1.3 2001/10/01 08:36:44 jlam Exp $ +$NetBSD: distinfo,v 1.4 2001/11/23 10:52:23 martti Exp $ SHA1 (mod_perl-1.25.tar.gz) = a3ad57bbf1143cdda4b80754ce8f34913f5df053 Size (mod_perl-1.25.tar.gz) = 366834 bytes SHA1 (patch-aa) = c19469efd351e3a545feb79a6d3af4f734b27449 +SHA1 (patch-ab) = 18b02747ae4b9ab17ce252cf003bf9fd7e4b2560 diff --git a/www/ap-perl/patches/patch-ab b/www/ap-perl/patches/patch-ab new file mode 100644 index 00000000000..2499de02126 --- /dev/null +++ b/www/ap-perl/patches/patch-ab @@ -0,0 +1,43 @@ +$NetBSD: patch-ab,v 1.5 2001/11/23 10:52:24 martti Exp $ + +--- src/modules/perl/Connection.xs.orig Fri Sep 29 16:41:30 2000 ++++ src/modules/perl/Connection.xs Fri Nov 23 11:38:03 2001 +@@ -78,7 +78,11 @@ + RETVAL = newSVpv((char *)&conn->remote_addr, + sizeof conn->remote_addr); + if(sv_addr) { ++#ifdef APACHE6 ++ struct sockaddr_storage addr; ++#else + struct sockaddr_in addr; ++#endif + STRLEN sockaddrlen; + char * new_addr = SvPV(sv_addr,sockaddrlen); + if (sockaddrlen != sizeof(addr)) { +@@ -106,7 +110,26 @@ + #else + conn->remote_ip = pstrdup(conn->pool, (char *)SvPV(ST(1),na)); + #endif ++#ifdef APACHE6 ++ { ++ struct addrinfo hints, *res0; ++ int error; ++ ++ memset(&hints, 0, sizeof(hints)); ++ hints.ai_family = PF_UNSPEC; ++ hints.ai_flags = AI_NUMERICHOST; ++ error = getaddrinfo(conn->remote_ip, NULL, &hints, &res0); ++ if (!error) { ++ memcpy(&conn->remote_addr, res0->ai_addr, res0->ai_addrlen); ++ freeaddrinfo(res0); ++ } else { ++ croak("Bad ip address in remote_ip getaddrinfo failed %s", ++ gai_strerror(error)); ++ } ++ } ++#else + conn->remote_addr.sin_addr.s_addr = inet_addr(conn->remote_ip); ++#endif + } + + OUTPUT: |