File: ftbfs-gcc15.patch

package info (click to toggle)
thc-ipv6 3.8-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,740 kB
  • sloc: ansic: 54,789; sh: 529; makefile: 75; perl: 34
file content (82 lines) | stat: -rw-r--r-- 3,115 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
From: Robert Scheck <robert@fedoraproject.org>
Date: Mon, 10 Feb 2025 02:50:12 +0100
Subject: [PATCH] Remove K&R function declarations for C23 compatibility
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

thc-ipv6-lib.c:2555:5: error: conflicting types for ‘thc_open_ipv6’; have ‘int(char *)’
 2555 | int thc_open_ipv6(char *interface) {
      |     ^~~~~~~~~~~~~
thc-ipv6.h:211:23: note: previous declaration of ‘thc_open_ipv6’ with type ‘int(void)’
  211 | extern int            thc_open_ipv6();
      |                       ^~~~~~~~~~~~~

detect_sniffer6.c:140:19: error: passing argument 2 of ‘signal’ from incompatible pointer type [-Wincompatible-pointer-types]
  140 |   signal(SIGALRM, alarming);
      |                   ^~~~~~~~
      |                   |
      |                   void (*)(void)

thcping6.c:648:21: error: passing argument 2 of ‘signal’ from incompatible pointer type [-Wincompatible-pointer-types]
  648 |     signal(SIGALRM, alarming);
      |                     ^~~~~~~~
      |                     |
      |                     void (*)(void)

Origin: upstream, https://github.com/vanhauser-thc/thc-ipv6/commit/c9617d5638196bd88336225a6abdfd45c3df0bcf.patch
Bug-Debian: https://bugs.debian.org/1097992
---
 detect_sniffer6.c | 4 ++--
 thc-ipv6.h        | 2 +-
 thcping6.c        | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/detect_sniffer6.c b/detect_sniffer6.c
index 32e2a7c..9620ff0 100644
--- a/detect_sniffer6.c
+++ b/detect_sniffer6.c
@@ -27,7 +27,7 @@ void help(char *prg) {
   exit(-1);
 }
 
-void alarming() {
+void alarming(int signal) {
   if (found == 0)
     printf("No packets received, no vulnerable system seems to be sniffing.\n");
   else
@@ -63,7 +63,7 @@ void check_packets(u_char *pingdata, const struct pcap_pkthdr *header,
       printf(" Sniffing host detected: %s\n", thc_ipv62notation(ptr + 8));
       memcpy(doubles[found], thc_ipv62notation(ptr + 8), 16);
       found++;
-      if (oneonly) alarming();
+      if (oneonly) alarming(0);
     }
   }
 }
diff --git a/thc-ipv6.h b/thc-ipv6.h
index 4d58f4b..9f4bb33 100644
--- a/thc-ipv6.h
+++ b/thc-ipv6.h
@@ -208,7 +208,7 @@ extern int thc_generate_pkt(char *interface, unsigned char *srcmac,
                             int *pkt_len);
 extern int thc_send_pkt(char *interface, unsigned char *pkt, int *pkt_len);
 extern unsigned char *thc_destroy_packet(unsigned char *pkt);
-extern int            thc_open_ipv6();
+extern int            thc_open_ipv6(char *interface);
 extern int            thc_is_dst_local(char *interface, unsigned char *dst);
 extern int  checksum_pseudo_header(unsigned char *src, unsigned char *dst,
                                    unsigned char type, unsigned char *data,
diff --git a/thcping6.c b/thcping6.c
index 167ceac..c279282 100644
--- a/thcping6.c
+++ b/thcping6.c
@@ -89,7 +89,7 @@ void help(char *prg, int help) {
   exit(-1);
 }
 
-void alarming() {
+void alarming(int signal) {
   if (done == 0) printf("No packet received, terminating.\n");
   exit(resp_type);
 }