Description: Fix FTBFS with GCC 15 (C23): drop legacy bzero/bcopy/rindex declarations
 rup.c and rsysinfo.c manually declared bzero/bcopy/rindex with an empty
 parameter list, which conflicts with the prototypes from <strings.h>
 (included via <rpc/rpc.h>) under C23 semantics and aborts the build.
 Remove these obsolete declarations; also rewrite the old-style (K&R)
 definition of pointopoint_v3 in rsysinfo.c as an ANSI definition and drop
 the redundant "extern void rstat_service();" in rstat_main.c, which
 conflicts with the prototype declared in rstat_proc.h.
Author: tangxiaofeng <tangxiaofeng@kylinos.cn>
Origin: other
Forwarded: not-needed
Last-Update: 2026-09-04

--- rstatd-4.0.1.orig/rstat_main.c
+++ rstatd-4.0.1/rstat_main.c
@@ -47,7 +47,6 @@
 
 static char * id = "@(#) $Id: rstat_main.c,v 1.3 2005/09/07 08:07:28 afm Exp $ $Revision: 1.3 $";
 
-extern void rstat_service();
 extern void test_connect();
 
 int inetd_connect = 1;
--- rstatd-4.0.1.orig/rsysinfo.c
+++ rstatd-4.0.1/rsysinfo.c
@@ -38,10 +38,6 @@
 #include <unistd.h>
 #include "rstat.h"
 
-void bzero();
-void bcopy();
-char *rindex();
-
 static char *id = "@(#) $Id: rsysinfo.c,v 1.4 2005/09/07 08:07:28 afm Exp $";
 static char *version0 = "@(#)rsysinfo version 3.06 (c) Andreas Klingler 3/5/2001 based on\n";
 char *version = "@(#)rsysinfo version 3.03 Copyright (Adam Migus) 1/9/96\n";
@@ -120,8 +116,7 @@ int	rsysinfo_answer_v3(struct statstime
 	return(0);
 }
 
-int pointopoint_v3(server_addr)
-struct sockaddr_in *server_addr;
+int pointopoint_v3(struct sockaddr_in *server_addr)
 {
 	struct statstime host_stat;
 	struct timeval pertry_timeout, total_timeout;
--- rstatd-4.0.1.orig/rup.c
+++ rstatd-4.0.1/rup.c
@@ -39,10 +39,6 @@
 #include <arpa/inet.h>
 #include "rstat.h"
 
-void bzero();
-void bcopy();
-char *rindex();
-
 char *version = "@(#)rup version 3.03 Copyright (Adam Migus) 1/9/96\n";
 char *program_name;
 

