diff --git a/srcpkgs/tcptrack/patches/format-time-t.patch b/srcpkgs/tcptrack/patches/format-time-t.patch new file mode 100644 index 00000000000..f2c5f66b5db --- /dev/null +++ b/srcpkgs/tcptrack/patches/format-time-t.patch @@ -0,0 +1,30 @@ +Fix -Werror=format (hard error in gcc-12) + +Also the last leg is unreachable, +because when it's true, the second leg also true. +Index: tcptrack-1.4.3/src/TextUI.cc +=================================================================== +--- tcptrack-1.4.3.orig/src/TextUI.cc ++++ tcptrack-1.4.3/src/TextUI.cc +@@ -308,12 +308,15 @@ void TextUI::drawui() + printw("RESET"); + + move(row,58); +- if( ic->getIdleSeconds() < 60 ) +- printw("%ds",ic->getIdleSeconds()); +- else if( ic->getIdleSeconds() > 59 ) +- printw("%dm",ic->getIdleSeconds()/60); +- else if( ic->getIdleSeconds() > 3559 ) +- printw("%dh",ic->getIdleSeconds()/3600); ++ { ++ long long int idle = ic->getIdleSeconds(); ++ if( idle < 60 ) ++ printw("%llds",idle); ++ else if( idle > 3559 ) ++ printw("%lldh",idle/3600); ++ else if( idle > 59 ) ++ printw("%lldm",idle/60); ++ } + + move(row,63); + if( ic->activityToggle() ) diff --git a/srcpkgs/tcptrack/template b/srcpkgs/tcptrack/template index bb0d9c716f4..843067c6473 100644 --- a/srcpkgs/tcptrack/template +++ b/srcpkgs/tcptrack/template @@ -1,7 +1,7 @@ # Template file for 'tcptrack' pkgname=tcptrack version=1.4.3 -revision=2 +revision=3 build_style=gnu-configure makedepends="libpcap-devel ncurses-devel" short_desc="Monitor TCP connections on network"