diff --git a/backport-use-correct-format-specifier-for-table-entcount-variable.patch b/backport-use-correct-format-specifier-for-table-entcount-variable.patch new file mode 100644 index 0000000000000000000000000000000000000000..7562c44286f85ca9ce99688ad46a8e5eee6666c9 --- /dev/null +++ b/backport-use-correct-format-specifier-for-table-entcount-variable.patch @@ -0,0 +1,28 @@ +From c090f7fbafa7a17a807644d92dde736327da23b7 Mon Sep 17 00:00:00 2001 +From: Vitezslav Samel +Date: Thu, 5 May 2022 20:48:14 +0200 +Subject: [PATCH] addethentry(): use correct format specifier + +Fixes warning from gcc-11.2. + +Conflict: NA +Reference:https://github.com/iptraf-ng/iptraf-ng/commit/c090f7fbafa7a17a807644d92dde736327da23b7 + +Signed-off-by: Vitezslav Samel +--- + src/hostmon.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/hostmon.c b/src/hostmon.c +index 1214483..ef37f55 100644 +--- a/src/hostmon.c ++++ b/src/hostmon.c +@@ -290,7 +290,7 @@ static struct ethtabent *addethentry(struct ethtab *table, + + table->entcount++; + +- mvwprintw(table->borderwin, LINES - 3, 1, " %u entries ", ++ mvwprintw(table->borderwin, LINES - 3, 1, " %lu entries ", + table->entcount); + + return ptemp; diff --git a/backport-use-correct-format-specifier-for-time_t-type.patch b/backport-use-correct-format-specifier-for-time_t-type.patch new file mode 100644 index 0000000000000000000000000000000000000000..a86440621e898f4c737994b4d0b32b54372406ce --- /dev/null +++ b/backport-use-correct-format-specifier-for-time_t-type.patch @@ -0,0 +1,34 @@ +From 48da13d3208e1f102308eb2803701df7a9470352 Mon Sep 17 00:00:00 2001 +From: Vitezslav Samel +Date: Thu, 5 May 2022 20:39:18 +0200 +Subject: [PATCH] updatetimes(): use correct format specifier for time_t type + +Fixes warning from gcc-11.2. + +Conflict: NA +Reference:https://github.com/iptraf-ng/iptraf-ng/commit/48da13d3208e1f102308eb2803701df7a9470352 + +Signed-off-by: Vitezslav Samel +--- + src/options.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/options.c b/src/options.c +index 3d7985e..9cef140 100644 +--- a/src/options.c ++++ b/src/options.c +@@ -179,10 +179,10 @@ void loadoptions(void) + static void updatetimes(WINDOW *win) + { + wattrset(win, HIGHATTR); +- mvwprintw(win, 10, 25, "%3u mins", options.timeout); +- mvwprintw(win, 11, 25, "%3u mins", options.logspan / 60); +- mvwprintw(win, 12, 25, "%3u secs", options.updrate); +- mvwprintw(win, 13, 25, "%3u mins", options.closedint); ++ mvwprintw(win, 10, 25, "%3ld mins", options.timeout); ++ mvwprintw(win, 11, 25, "%3ld mins", options.logspan / 60); ++ mvwprintw(win, 12, 25, "%3ld secs", options.updrate); ++ mvwprintw(win, 13, 25, "%3ld mins", options.closedint); + } + + static void showoptions(WINDOW *win) diff --git a/backport-use-correct-format-specifier-when-printing-packet-count.patch b/backport-use-correct-format-specifier-when-printing-packet-count.patch new file mode 100644 index 0000000000000000000000000000000000000000..d189eb4e04e96ff202a80756bf220ce250ddcae6 --- /dev/null +++ b/backport-use-correct-format-specifier-when-printing-packet-count.patch @@ -0,0 +1,29 @@ +From 42b8126f0ddfabf89aa8ec2345f726915d8cf97e Mon Sep 17 00:00:00 2001 +From: Vitezslav Samel +Date: Thu, 5 May 2022 20:44:44 +0200 +Subject: [PATCH] printdetails(): use correct format specifier when printing + packet count + +Fixes warning from gcc-11.2. + +Conflict: NA +Reference:https://github.com/iptraf-ng/iptraf-ng/commit/42b8126f0ddfabf89aa8ec2345f726915d8cf97e + +Signed-off-by: Vitezslav Samel +--- + src/detstats.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/detstats.c b/src/detstats.c +index 7c5ff3f..e6c515b 100644 +--- a/src/detstats.c ++++ b/src/detstats.c +@@ -406,7 +406,7 @@ static void printdetails(struct ifcounts *ifcounts, WINDOW * win) + + /* Bad packet count */ + +- mvwprintw(win, 19, 65, "%8lu", ifcounts->bad.pc_packets); ++ mvwprintw(win, 19, 65, "%8llu", ifcounts->bad.pc_packets); + } + + static void detstats_process_key(int ch) diff --git a/iptraf-ng.spec b/iptraf-ng.spec index 5b03ec2b2c10eecf9c4386c792412fcb024468bb..cc9f025ea717544ba4ef20e17562e441be7e8b16 100644 --- a/iptraf-ng.spec +++ b/iptraf-ng.spec @@ -1,13 +1,17 @@ Name: iptraf-ng Summary: A console-based network monitoring utility Version: 1.2.1 -Release: 1 +Release: 2 License: GPLv2+ URL: https://github.com/%{name}/%{name}/ Source0: https://github.com/%{name}/%{name}/archive/v%{version}.tar.gz Source1: %{name}-logrotate.conf Source2: %{name}-tmpfiles.conf +Patch0: backport-use-correct-format-specifier-for-time_t-type.patch +Patch1: backport-use-correct-format-specifier-when-printing-packet-count.patch +Patch2: backport-use-correct-format-specifier-for-table-entcount-variable.patch + BuildRequires: gcc ncurses-devel Obsoletes: iptraf < 3.1 Provides: iptraf = 3.1 @@ -70,6 +74,12 @@ install -d -m 0755 %{buildroot}/run/%{name}/ %{_mandir}/man8/*.8.gz %changelog +* Thu Oct 20 2022 yanglu - 1.2.1-2 +- Type:bugfix +- Id:NA +- SUG:NA +- DESC:fix some compilation warnings + * Tue Jan 26 2021 xihaochen - 1.2.1-1 - Type:requirements - Id:NA