File: gcc-15.patch

package info (click to toggle)
icmpinfo 1.11-13
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 240 kB
  • sloc: ansic: 1,318; makefile: 50
file content (70 lines) | stat: -rw-r--r-- 1,948 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
Author: Andreas Tille <tille@debian.org>
Last-Update: 2025-09-20
Bug-Debian: https://bugs.debian.org/1096825
Description: Fix some old style definitions to build with gcc-15

--- a/print.c
+++ b/print.c
@@ -19,16 +19,15 @@
 #endif
 #endif
 
-char to_hex(a)
-  int a;
+char to_hex(int a)
 {
   return ((char)(a <= 9 ? a + '0' : (a -10) + 'A'));
 }
 
-int pr_pack(buf, cc, from)
-char			*buf;	/* ptr to start of IP header */
-int			cc;	/* total size of received packet */
-struct sockaddr_in	*from;	/* address of sender */
+int pr_pack(char *buf, int cc, struct sockaddr_in *from)
+/* char			*buf;	* ptr to start of IP header */
+/* int			cc;	* total size of received packet */
+/* struct sockaddr_in	*from;	* address of sender */
 {
   int			iphdrlen,doipdecoding=1;
   int                  iplen;
@@ -36,7 +35,7 @@ struct sockaddr_in	*from;	/* address of
   register struct icmp	*icp;	/* ptr to ICMP header */
   struct tcphdr 	*tp;    /* ptr to TCP header */
   time_t			t;
-  char			*pr_type(),*pr_subtype(),*strtime;
+  char			*pr_type(register int),*pr_subtype(register int),*strtime;
   struct hostent	*hostent=NULL;
   struct servent	*servent=NULL;
   static char prbuf[1024]={'\0'};	/* provide enough room for even the longest hosts*/
@@ -212,8 +211,7 @@ struct sockaddr_in	*from;	/* address of
  */
 
 char *
-pr_type(t)
-register int t;
+pr_type(register int t)
 {
 	static char	*ttab[] = {
 		"Echo_Reply",
@@ -265,8 +263,7 @@ register int t;
  */
 
 char *
-pr_subtype(t)
-register int t;
+pr_subtype(register int t)
 {
 	static char	*ttab[] = {
 	  "Net",
--- a/defs.h
+++ b/defs.h
@@ -45,7 +45,8 @@ DCLARE u_char		recvpack[MAXPACKET];	/* t
 
 DCLARE int			sockfd;	/* socket file descriptor */
 
-char		*inet_ntoa();	/* BSD library routine */
+#include <arpa/inet.h>
+#include <netinet/in.h>
 
 DCLARE int     nonamequery;  /*  flag for query/noquery of ip -> name */
 DCLARE int     showsrcip;    /*  flag for showing or not src ip */