Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Jan 2025 21:43:52 GMT
From:      Piotr Kubaj <pkubaj@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: aa03dfb264bc - main - net-mgmt/tcptrack: fix build on armv7 / powerpc
Message-ID:  <202501122143.50CLhqx2098692@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=aa03dfb264bc2862bb124fbed737adf331622fdd

commit aa03dfb264bc2862bb124fbed737adf331622fdd
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2025-01-12 16:19:01 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2025-01-12 21:41:57 +0000

    net-mgmt/tcptrack: fix build on armv7 / powerpc
    
    TextUI.cc:306:17: error: format specifies type 'int' but the argument has type 'time_t' (aka 'long long') [-Werror,-Wformat]
      306 |                         printw("%ds",ic->getIdleSeconds());
          |                                 ~~   ^~~~~~~~~~~~~~~~~~~~
          |                                 %lld
    TextUI.cc:308:17: error: format specifies type 'int' but the argument has type 'time_t' (aka 'long long') [-Werror,-Wformat]
      308 |                         printw("%dm",ic->getIdleSeconds()/60);
          |                                 ~~   ^~~~~~~~~~~~~~~~~~~~~~~
          |                                 %lld
    TextUI.cc:310:17: error: format specifies type 'int' but the argument has type 'time_t' (aka 'long long') [-Werror,-Wformat]
      310 |                         printw("%dh",ic->getIdleSeconds()/3600);
          |                                 ~~   ^~~~~~~~~~~~~~~~~~~~~~~~~
          |                                 %lld
    3 errors generated.
---
 net-mgmt/tcptrack/files/patch-no-stack-limits | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/net-mgmt/tcptrack/files/patch-no-stack-limits b/net-mgmt/tcptrack/files/patch-no-stack-limits
index e58660ed957d..0f74a38e2a4b 100644
--- a/net-mgmt/tcptrack/files/patch-no-stack-limits
+++ b/net-mgmt/tcptrack/files/patch-no-stack-limits
@@ -158,3 +158,18 @@ too low).
 +	if (pthread_create(&displayer_tid, NULL, displayer_thread_func, this) != 0)
  		throw GenericError("pthread_create() returned an error.");
  
+@@ -309,11 +303,11 @@
+ 
+ 		move(row,58);
+ 		if( ic->getIdleSeconds() < 60 )
+-			printw("%ds",ic->getIdleSeconds());
++			printw("%ds",(int)(ic->getIdleSeconds()));
+ 		else if( ic->getIdleSeconds() > 59 ) 
+-			printw("%dm",ic->getIdleSeconds()/60);
++			printw("%dm",(int)(ic->getIdleSeconds())/60);
+ 		else if( ic->getIdleSeconds() > 3559 )
+-			printw("%dh",ic->getIdleSeconds()/3600);
++			printw("%dh",(int)(ic->getIdleSeconds())/3600);
+ 
+ 		move(row,63);
+ 		if( ic->activityToggle() )



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202501122143.50CLhqx2098692>