commit: 6281fa7fb49395b2468c705757102e1cc462b9c1 Author: David Seifert <soap <AT> gentoo <DOT> org> AuthorDate: Sat Feb 7 09:19:51 2026 +0000 Commit: David Seifert <soap <AT> gentoo <DOT> org> CommitDate: Sat Feb 7 09:19:51 2026 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6281fa7f
net-analyzer/mrtg: add patch for C23 Signed-off-by: David Seifert <soap <AT> gentoo.org> net-analyzer/mrtg/files/mrtg-2.17.10-c23.patch | 87 ++++++++++++++++++++++ .../mrtg/files/mrtg-2.17.10-implicit.patch | 5 +- net-analyzer/mrtg/mrtg-2.17.10-r1.ebuild | 3 +- 3 files changed, 91 insertions(+), 4 deletions(-) diff --git a/net-analyzer/mrtg/files/mrtg-2.17.10-c23.patch b/net-analyzer/mrtg/files/mrtg-2.17.10-c23.patch new file mode 100644 index 000000000000..c090637d5ce3 --- /dev/null +++ b/net-analyzer/mrtg/files/mrtg-2.17.10-c23.patch @@ -0,0 +1,87 @@ +From a64a83210643114b3a892e70ce07ded5bd5de054 Mon Sep 17 00:00:00 2001 +From: Joao Eriberto Mota Filho <[email protected]> +Date: Fri, 23 May 2025 11:45:16 -0300 +Subject: [PATCH] Fix function definitions to use modern ANSI C prototypes + (#119) + +* Fix function definitions to use modern ANSI C prototypes + +This commit solves GCC-15 warnings +"old-style function definition [-Wold-style-definition]" + +Closes #115 + +* Update CHANGES + +--------- + +Co-authored-by: Tobias Oetiker <[email protected]> +--- a/src/rateup.c ++++ b/src/rateup.c +@@ -264,18 +264,11 @@ static double expscale(double y, double maxy) + } + + static void +-image (file, maxvi, maxvo, maxx, maxy, xscale, yscale, growright, step, bits, +- ytics, yticsf, peak, currdatetimeformat, currdatetimepos) +- char *file; +- long long maxvi, maxvo; +- long maxx; +- long maxy, growright, step, bits; +- double xscale, yscale; +- int ytics; /* number of tics on the y axis */ +- double yticsf; /* scale everything on the y axis with this factor */ +- int peak; +- char *currdatetimeformat; +- int currdatetimepos; ++image (char *file, long long maxvi, long long maxvo, long maxx, long maxy, double xscale, double yscale, ++ long growright, long step, long bits, int ytics, double yticsf, int peak, char *currdatetimeformat, ++ int currdatetimepos) ++ /* ytics: number of tics on the y axis */ ++ /* yticsf: scale everything on the y axis with this factor */ + { + FILE *fo; + char file_tmp[10240]; +@@ -1156,8 +1149,7 @@ image (file, maxvi, maxvo, maxx, maxy, xscale, yscale, growright, step, bits, + + + static double +-diff (a, b) +- char *a, *b; ++diff (char *a, char *b) + { + char res[MAXL], *a1, *b1, *r1; + int c, x, m; +@@ -1228,8 +1220,7 @@ diff (a, b) + } + + static int +-readhist (file) +- char *file; ++readhist (char *file) + { + FILE *fi; + int x, retcode = 0; +@@ -1380,10 +1371,7 @@ readfile () + } + + static void +-update (in, out, abs_max, absupdate) +- char *in, *out; +- long long abs_max; +- int absupdate; ++update (char *in, char *out, long long abs_max, int absupdate) + { + FILE *fo; + char buf[128], buf1[128], buf2[128]; +@@ -1824,9 +1812,7 @@ readparam (char const *file) + } + + int +-main (argc, argv) +- int argc; +- char **argv; ++main (int argc, char **argv) + { + int x, argi, used, initarg; + diff --git a/net-analyzer/mrtg/files/mrtg-2.17.10-implicit.patch b/net-analyzer/mrtg/files/mrtg-2.17.10-implicit.patch index 1791ead7e334..2dff4251cbc5 100644 --- a/net-analyzer/mrtg/files/mrtg-2.17.10-implicit.patch +++ b/net-analyzer/mrtg/files/mrtg-2.17.10-implicit.patch @@ -1,6 +1,5 @@ -diff '--color=auto' -ruN mrtg-2.17.10.orig/configure.ac mrtg-2.17.10/configure.ac ---- mrtg-2.17.10.orig/configure.ac 2021-10-10 14:16:11.000000000 +0200 -+++ mrtg-2.17.10/configure.ac 2024-11-05 21:45:35.764839321 +0100 +--- a/configure.ac ++++ b/configure.ac @@ -31,6 +31,7 @@ AC_CACHE_VAL(mr_cv_long_long_format_specifier,[ for format in ll l q I64; do diff --git a/net-analyzer/mrtg/mrtg-2.17.10-r1.ebuild b/net-analyzer/mrtg/mrtg-2.17.10-r1.ebuild index 2a9ab60ac89f..270ab21b032d 100644 --- a/net-analyzer/mrtg/mrtg-2.17.10-r1.ebuild +++ b/net-analyzer/mrtg/mrtg-2.17.10-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2025 Gentoo Authors +# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -24,6 +24,7 @@ RDEPEND="${DEPEND} PATCHES=( "${FILESDIR}"/${PN}-2.17.4-socket6.patch "${FILESDIR}"/${PN}-2.17.10-implicit.patch + "${FILESDIR}"/${PN}-2.17.10-c23.patch ) src_prepare() {
