Florian Weimer 2022-12-16 17:01:29 +01:00
parent 9d80b096bd
commit c1080602cf
2 changed files with 38 additions and 1 deletions

32
mrtg-configure-c99.patch Normal file
View File

@ -0,0 +1,32 @@
Avoid an implicit declaration of exit. This prevents compilation
failures in case compilers switch to rejecting implicit function
declarations by default.
Submitted upstream: <https://github.com/oetiker/mrtg/pull/104>
diff --git a/configure b/configure
index 07b0fbda88c3847a..8b87d2750822c02b 100755
--- a/configure
+++ b/configure
@@ -3670,7 +3670,7 @@ else
char buffer[1000];
sprintf (buffer, "%${format}u", a);
sscanf (buffer, "%${format}u", &b);
- exit (b!=a);
+ return b!=a;
}
_ACEOF
diff --git a/configure.ac b/configure.ac
index 1416f3c2d6e2f645..939725ccf306fb2f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,7 +37,7 @@ AC_CACHE_VAL(mr_cv_long_long_format_specifier,[
char buffer[1000];
sprintf (buffer, "%${format}u", a);
sscanf (buffer, "%${format}u", &b);
- exit (b!=a);
+ return b!=a;
}
]])],[mr_cv_long_long_format_specifier="%${format}d"
mr_cv_long_long_format="${format}d"

View File

@ -11,7 +11,7 @@
Summary: Multi Router Traffic Grapher
Name: mrtg
Version: 2.17.10
Release: 2%{?dist}
Release: 3%{?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
@ -38,6 +38,7 @@ Patch0: mrtg-2.15.0-lib64.patch
Patch1: mrtg-2.17.2-socket6-fix.patch
# Patch2: some devices return 2**32-2 on ifSpeed (e. g. IBM FibreChannel switches)
Patch2: mrtg-2.17.4-cfgmaker-ifhighspeed.patch
Patch3: mrtg-configure-c99.patch
License: GPLv2+
Requires(post): systemd-units
Requires(preun): systemd-units
@ -82,6 +83,7 @@ Custom SELinux policy module
%patch0 -p1 -b .lib64
%patch1 -p1 -b .socket6
%patch2 -p1 -b .ifhighspeed
%patch3 -p1 -b .c99
for i in doc/mrtg-forum.1 doc/mrtg-squid.1 CHANGES; do
iconv -f iso-8859-1 -t utf-8 < "$i" > "${i}_"
@ -211,6 +213,9 @@ fi
%endif
%changelog
* Fri Dec 16 2022 Florian Weimer <fweimer@redhat.com> - 2.17.10-3
- Port configure script to C99
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.17.10-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild