diff --git a/mrtg-configure-c99.patch b/mrtg-configure-c99.patch new file mode 100644 index 0000000..bc0831c --- /dev/null +++ b/mrtg-configure-c99.patch @@ -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: + +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" diff --git a/mrtg.spec b/mrtg.spec index 3754c25..0d55415 100644 --- a/mrtg.spec +++ b/mrtg.spec @@ -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 - 2.17.10-3 +- Port configure script to C99 + * Thu Jul 21 2022 Fedora Release Engineering - 2.17.10-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild