Control: tags -1 patch
Thanks

Hi,

the attached patch fixes some old style definitions to build with gcc-15.

Kind regards
    Andreas.

-- 
https://fam-tille.de
Author: Andreas Tille <[email protected]>
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 */

Reply via email to