File: 01_Socket6_import.patch

package info (click to toggle)
libsnmp-session-perl 1.14~git20221124T101957-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,104 kB
  • sloc: perl: 11,920; ansic: 25; makefile: 15
file content (26 lines) | stat: -rw-r--r-- 856 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Description: Fix "Warnings from SNMP_Session.pm"
Origin: https://oss.oetiker.ch/mrtg-trac/ticket/45
Bug-Debian: https://bugs.debian.org/628804
Author: gregor herrmann <gregoa@debian.org>
Forwarded: https://github.com/sleinen/snmp-session/pull/7

--- a/lib/SNMP_Session.pm
+++ b/lib/SNMP_Session.pm
@@ -140,7 +140,7 @@ BEGIN {
 
     if (eval {local $SIG{__DIE__};require Socket6;} &&
        eval {local $SIG{__DIE__};require IO::Socket::INET6; IO::Socket::INET6->VERSION("1.26");}) {
-	import Socket6;
+	Socket6->import(qw(inet_pton getaddrinfo));
 	$ipv6_addr_len = length(pack_sockaddr_in6(161, inet_pton(AF_INET6(), "::1")));
 	$SNMP_Session::ipv6available = 1;
     }
@@ -850,7 +850,7 @@ use Carp;
 BEGIN {
     if($SNMP_Session::ipv6available) {
 	import IO::Socket::INET6;
-	import Socket6;
+	Socket6->import(qw(inet_pton getaddrinfo));
     }
 }