[mrtg/f16] Fix 'undefined subroutine &main::AF_UNSPEC called at /usr/bin/mrtg line 2247.' error
vcrhonek
vcrhonek at fedoraproject.org
Tue Dec 20 09:42:13 UTC 2011
commit df97d9eb0b6a03a7760c49670bd8ed0fafb2ea80
Author: Vitezslav Crhonek <Vitezslav.Crhonek at seznam.cz>
Date: Tue Dec 20 10:42:06 2011 +0100
Fix 'undefined subroutine &main::AF_UNSPEC called at /usr/bin/mrtg line 2247.' error
mrtg-2.17.2-undefined-af_unspec-fix.patch | 12 ++++++++++++
mrtg.spec | 7 ++++++-
2 files changed, 18 insertions(+), 1 deletions(-)
---
diff --git a/mrtg-2.17.2-undefined-af_unspec-fix.patch b/mrtg-2.17.2-undefined-af_unspec-fix.patch
new file mode 100644
index 0000000..651aee7
--- /dev/null
+++ b/mrtg-2.17.2-undefined-af_unspec-fix.patch
@@ -0,0 +1,12 @@
+diff -up mrtg-2.17.2/bin/mrtg.old mrtg-2.17.2/bin/mrtg
+--- mrtg-2.17.2/bin/mrtg.old 2011-12-20 09:55:08.471346161 +0100
++++ mrtg-2.17.2/bin/mrtg 2011-12-20 09:56:10.314728949 +0100
+@@ -2244,7 +2244,7 @@ sub getsnmparg ($$$$){
+ my @res;
+ my ($too,$port,$otheropts) = split(':', $$target{SnmpOpt}, 3);
+ $port = 161 unless defined $port;
+- @res = getaddrinfo($hostname, $port, AF_UNSPEC(), SOCK_DGRAM());
++ @res = getaddrinfo($hostname, $port, Socket::AF_UNSPEC(), Socket::SOCK_DGRAM());
+ if (scalar (@res) < 5) {
+ warn "$NOW: WARNING: Skipping host $hostname as it does not resolve to an IPv4 or IPv6 address\n";
+ return 'DEADHOST';
diff --git a/mrtg.spec b/mrtg.spec
index f842616..02315d7 100644
--- a/mrtg.spec
+++ b/mrtg.spec
@@ -6,7 +6,7 @@
Summary: Multi Router Traffic Grapher
Name: mrtg
Version: 2.17.2
-Release: 5%{?dist}
+Release: 6%{?dist}
URL: http://oss.oetiker.ch/mrtg/
Source0: http://oss.oetiker.ch/mrtg/pub/mrtg-%{version}.tar.gz
Source1: http://oss.oetiker.ch/mrtg/pub/mrtg-%{version}.tar.gz.md5
@@ -19,6 +19,7 @@ Source8: mrtg.service
Source9: mrtg.timer
Patch0: mrtg-2.15.0-lib64.patch
Patch2: mrtg-2.17.2-socket6-fix.patch
+Patch3: mrtg-2.17.2-undefined-af_unspec-fix.patch
License: GPLv2+
Group: Applications/Internet
Requires(post): systemd-units
@@ -41,6 +42,7 @@ images which provide a LIVE visual representation of this traffic.
%setup -q
%patch0 -p1 -b .lib64
%patch2 -p1 -b .socket6
+%patch3 -p1 -b .undefined-af_unspec-fix
for i in doc/mrtg-forum.1 doc/mrtg-squid.1 CHANGES; do
iconv -f iso-8859-1 -t utf-8 < "$i" > "${i}_"
@@ -133,6 +135,9 @@ fi
%{_unitdir}/mrtg.timer
%changelog
+* Tue Dec 20 2011 Vitezslav Crhonek <vcrhonek at redhat.com> - 2.17.2-6
+- Fix 'undefined subroutine &main::AF_UNSPEC called at /usr/bin/mrtg line 2247.' error
+
* Sun Oct 2 2011 Tom Callaway <spot at fedoraproject.org> - 2.17.2-5
- Resolve bugzilla 732587
More information about the scm-commits
mailing list