|
Added
Link Here
|
| 0 |
- |
1 |
--- src/attack.c.orig 2022-07-18 09:07:38 UTC |
|
|
2 |
+++ src/attack.c |
| 3 |
@@ -40,7 +40,7 @@ |
| 4 |
#include "utils.h" |
| 5 |
|
| 6 |
#include <arpa/inet.h> /* for inet_ntoa() */ |
| 7 |
-#include <bsd/unistd.h> |
| 8 |
+ |
| 9 |
#include <errno.h> /* for errno() */ |
| 10 |
#include <fcntl.h> |
| 11 |
#include <glib.h> |
| 12 |
@@ -53,6 +53,7 @@ |
| 13 |
#include <gvm/util/nvticache.h> /* for nvticache_t */ |
| 14 |
#include <pthread.h> |
| 15 |
#include <stdlib.h> /* for exit() */ |
| 16 |
+#include <stdint.h> /* for intmax_t */ |
| 17 |
#include <string.h> /* for strlen() */ |
| 18 |
#include <sys/wait.h> /* for waitpid() */ |
| 19 |
#include <unistd.h> /* for close() */ |
| 20 |
@@ -1493,13 +1494,13 @@ stop: |
| 21 |
|
| 22 |
gettimeofday (&now, NULL); |
| 23 |
if (test_alive_hosts_only) |
| 24 |
- g_message ("Vulnerability scan %s finished in %ld seconds: " |
| 25 |
+ g_message ("Vulnerability scan %s finished in %jd seconds: " |
| 26 |
"%d alive hosts of %d", |
| 27 |
- globals->scan_id, now.tv_sec - then.tv_sec, |
| 28 |
+ globals->scan_id, (intmax_t)(now.tv_sec - then.tv_sec), |
| 29 |
gvm_hosts_count (alive_hosts_list), gvm_hosts_count (hosts)); |
| 30 |
else |
| 31 |
- g_message ("Vulnerability scan %s finished in %ld seconds: %d hosts", |
| 32 |
- globals->scan_id, now.tv_sec - then.tv_sec, |
| 33 |
+ g_message ("Vulnerability scan %s finished in %jd seconds: %d hosts", |
| 34 |
+ globals->scan_id, (intmax_t)(now.tv_sec - then.tv_sec), |
| 35 |
gvm_hosts_count (hosts)); |
| 36 |
|
| 37 |
gvm_hosts_free (hosts); |