pack_sockaddr_in6 --> Socket6::pack_sockaddr_in6

PR:		181229
Submitted by:	Darren Henderson <darren.henderson@gmail.com>
This commit is contained in:
Dmitry Sivachenko 2013-08-12 11:15:04 +00:00
parent 5a2b17250f
commit 39cad52958
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=324621
2 changed files with 7 additions and 5 deletions

View file

@ -3,7 +3,7 @@
PORTNAME= SNMP_Session
PORTVERSION= 1.13
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= net-mgmt perl5
MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE}
PROJECTHOST= snmp-session

View file

@ -1,14 +1,16 @@
--- lib/SNMP_Session.pm.orig 2011-01-31 14:10:12.000000000 +0600
+++ lib/SNMP_Session.pm 2011-01-31 14:11:20.000000000 +0600
@@ -146,7 +146,7 @@
--- lib/SNMP_Session.pm.orig 2008-11-21 08:25:17.000000000 +0300
+++ lib/SNMP_Session.pm 2013-08-12 15:13:26.000000000 +0400
@@ -146,8 +146,8 @@
if (eval {local $SIG{__DIE__};require Socket6;} &&
eval {local $SIG{__DIE__};require IO::Socket::INET6; IO::Socket::INET6->VERSION("1.26");}) {
- import Socket6;
- $ipv6_addr_len = length(pack_sockaddr_in6(161, inet_pton(AF_INET6(), "::1")));
+ Socket6->import(qw(inet_pton inet_ntop getaddrinfo));
$ipv6_addr_len = length(pack_sockaddr_in6(161, inet_pton(AF_INET6(), "::1")));
+ $ipv6_addr_len = length(Socket6::pack_sockaddr_in6(161, inet_pton(AF_INET6(), "::1")));
$SNMP_Session::ipv6available = 1;
}
eval 'local $SIG{__DIE__};local $SIG{__WARN__};$dont_wait_flags = MSG_DONTWAIT();';
@@ -549,7 +549,7 @@
# complaining about AF_INET6 when Socket6 is not available