git: 87b725e05fd5 - 2023Q1 - security/openvas: fix build on powerpc

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Wed, 04 Jan 2023 08:01:44 UTC
The branch 2023Q1 has been updated by pkubaj:

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

commit 87b725e05fd5da206223f535fdb987d5e4537a26
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2023-01-04 07:59:26 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2023-01-04 08:01:37 +0000

    security/openvas: fix build on powerpc
    
    Cast to long long to account for 64-bit time_t.
    
    (cherry picked from commit 90068af778dee5457e5332e7a8725e0dfab36e9b)
---
 security/openvas/files/patch-src_attack.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/security/openvas/files/patch-src_attack.c b/security/openvas/files/patch-src_attack.c
new file mode 100644
index 000000000000..2d6e3094ab66
--- /dev/null
+++ b/security/openvas/files/patch-src_attack.c
@@ -0,0 +1,20 @@
+--- src/attack.c.orig	2023-01-03 21:45:22 UTC
++++ src/attack.c
+@@ -1493,13 +1493,13 @@ stop:
+ 
+   gettimeofday (&now, NULL);
+   if (test_alive_hosts_only)
+-    g_message ("Vulnerability scan %s finished in %ld seconds: "
++    g_message ("Vulnerability scan %s finished in %lld seconds: "
+                "%d alive hosts of %d",
+-               globals->scan_id, now.tv_sec - then.tv_sec,
++               globals->scan_id, (long long)now.tv_sec - then.tv_sec,
+                gvm_hosts_count (alive_hosts_list), gvm_hosts_count (hosts));
+   else
+-    g_message ("Vulnerability scan %s finished in %ld seconds: %d hosts",
+-               globals->scan_id, now.tv_sec - then.tv_sec,
++    g_message ("Vulnerability scan %s finished in %lld seconds: %d hosts",
++               globals->scan_id, (long long)now.tv_sec - then.tv_sec,
+                gvm_hosts_count (hosts));
+ 
+   gvm_hosts_free (hosts);