diff -Nru rstatd-4.0.1/debian/changelog rstatd-4.0.1/debian/changelog --- rstatd-4.0.1/debian/changelog 2025-01-06 03:26:23.000000000 +0530 +++ rstatd-4.0.1/debian/changelog 2026-05-23 12:29:53.000000000 +0530 @@ -1,3 +1,27 @@ +rstatd (4.0.1-12.1) unstable; urgency=medium + + * Non-maintainer upload. + * Fix FTBFS with GCC 15 / C23 (Closes: #1097808): + Under C23, an empty parameter list '()' is equivalent to '(void)'; + several K&R-style declarations therefore declared zero-argument + functions, conflicting with their real prototypes and call sites. + - debian/patches/06-fix-ftbfs-gcc15-rup.patch: in rup.c, drop the + K&R-style declarations 'void bzero(); void bcopy(); char *rindex();' + and include for correct BSD-compat prototypes. + - debian/patches/07-fix-ftbfs-gcc15-rsysinfo.patch: apply the + identical fix to rsysinfo.c. + - debian/patches/08-fix-ftbfs-gcc15-rstat_main.patch: in + rstat_main.c, drop the redundant K&R declaration of rstat_service + (the correct prototype is provided by rstat_proc.h), update the + declaration of test_connect, and change the cleanup() definition + to take an int parameter so it matches the signal() handler + signature 'void (int)'. + - debian/patches/09-fix-ftbfs-gcc15-rstat_proc.patch: update the + definition of test_connect() in rstat_proc.c to take an int sig + parameter for the same reason. + + -- Azeez Syed Sat, 23 May 2026 14:00:00 +0530 + rstatd (4.0.1-12) unstable; urgency=medium * Standards-Version: 4.7.0 diff -Nru rstatd-4.0.1/debian/patches/06-fix-ftbfs-gcc15-rup.patch rstatd-4.0.1/debian/patches/06-fix-ftbfs-gcc15-rup.patch --- rstatd-4.0.1/debian/patches/06-fix-ftbfs-gcc15-rup.patch 1970-01-01 05:30:00.000000000 +0530 +++ rstatd-4.0.1/debian/patches/06-fix-ftbfs-gcc15-rup.patch 2026-05-23 12:03:16.000000000 +0530 @@ -0,0 +1,31 @@ +Description: Fix FTBFS with GCC 15 / C23: drop K&R-style decls in rup.c + GCC 15 defaults to the C23 standard, in which an empty parameter list + '()' is equivalent to '(void)' rather than 'unspecified arguments' as + in C89/C90. The hand-written prototypes 'void bzero(); void bcopy(); + char *rindex();' therefore declare these functions as taking zero + arguments, conflicting with the real prototypes and causing + 'too many arguments to function' errors at every call site. + . + Remove the three broken declarations and include , the + BSD-compat header that provides correct prototypes for bzero(), + bcopy() and rindex(). +Author: Azeez Syed +Bug-Debian: https://bugs.debian.org/1097808 +Forwarded: no +Last-Update: 2026-05-23 +--- a/rup.c ++++ b/rup.c +@@ -37,12 +37,9 @@ + #include + #include + #include ++#include + #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; + diff -Nru rstatd-4.0.1/debian/patches/07-fix-ftbfs-gcc15-rsysinfo.patch rstatd-4.0.1/debian/patches/07-fix-ftbfs-gcc15-rsysinfo.patch --- rstatd-4.0.1/debian/patches/07-fix-ftbfs-gcc15-rsysinfo.patch 1970-01-01 05:30:00.000000000 +0530 +++ rstatd-4.0.1/debian/patches/07-fix-ftbfs-gcc15-rsysinfo.patch 2026-05-23 12:08:02.000000000 +0530 @@ -0,0 +1,30 @@ +Description: Fix FTBFS with GCC 15 / C23: drop K&R-style decls in rsysinfo.c + rsysinfo.c carries the same broken K&R-style declarations of bzero(), + bcopy() and rindex() as rup.c. Under C23 these declare zero-argument + functions, conflicting with the real prototypes when bzero/bcopy are + called with arguments later in the file. (rindex is declared but + unused in rsysinfo.c; it is removed alongside the others to avoid + reintroducing the conflict.) + . + Drop the three declarations and include for correct + prototypes. +Author: Azeez Syed +Bug-Debian: https://bugs.debian.org/1097808 +Forwarded: no +Last-Update: 2026-05-23 +--- a/rsysinfo.c ++++ b/rsysinfo.c +@@ -36,12 +36,9 @@ + #include + #include + #include ++#include + #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"; diff -Nru rstatd-4.0.1/debian/patches/08-fix-ftbfs-gcc15-rstat_main.patch rstatd-4.0.1/debian/patches/08-fix-ftbfs-gcc15-rstat_main.patch --- rstatd-4.0.1/debian/patches/08-fix-ftbfs-gcc15-rstat_main.patch 1970-01-01 05:30:00.000000000 +0530 +++ rstatd-4.0.1/debian/patches/08-fix-ftbfs-gcc15-rstat_main.patch 2026-05-23 12:25:42.000000000 +0530 @@ -0,0 +1,44 @@ +Description: Fix FTBFS with GCC 15 / C23: rstat_main.c prototype fixes + Three problems caused by C23 treating '()' as '(void)': + . + 1. 'extern void rstat_service();' shadowed the correct prototype that + rstat_proc.h (already included) provides, declaring rstat_service + as taking no arguments. svc_register() calls then failed with + 'incompatible pointer type' because the real function takes + (struct svc_req *, SVCXPRT *). Removing the K&R declaration lets + the proper prototype from rstat_proc.h take effect. + . + 2. 'extern void test_connect();' had the same problem, plus this + function is used as a SIGALRM handler via signal(); POSIX requires + handlers to have signature 'void (int)'. Update the declaration + accordingly. + . + 3. 'void cleanup()' is the SIGINT/SIGTERM/SIGHUP handler. Update its + definition to 'void cleanup(int sig)' so the function-pointer type + matches what signal() expects. The body does not use the signal + number; the unused parameter is harmless. +Author: Azeez Syed +Bug-Debian: https://bugs.debian.org/1097808 +Forwarded: no +Last-Update: 2026-05-23 +--- a/rstat_main.c ++++ b/rstat_main.c +@@ -47,8 +47,7 @@ + + 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(); ++extern void test_connect(int sig); + + int inetd_connect = 1; + +@@ -68,7 +67,7 @@ void background() + } + setsid(); + } +-void cleanup() ++void cleanup(int sig) + { + (void) pmap_unset(RSTATPROG, RSTATVERS_USERS); + (void) pmap_unset(RSTATPROG, RSTATVERS_TIME); diff -Nru rstatd-4.0.1/debian/patches/09-fix-ftbfs-gcc15-rstat_proc.patch rstatd-4.0.1/debian/patches/09-fix-ftbfs-gcc15-rstat_proc.patch --- rstatd-4.0.1/debian/patches/09-fix-ftbfs-gcc15-rstat_proc.patch 1970-01-01 05:30:00.000000000 +0530 +++ rstatd-4.0.1/debian/patches/09-fix-ftbfs-gcc15-rstat_proc.patch 2026-05-23 12:28:36.000000000 +0530 @@ -0,0 +1,22 @@ +Description: Fix FTBFS with GCC 15 / C23: test_connect signal handler signature + test_connect() is installed as a SIGALRM handler via signal() in + rstat_main.c. POSIX requires signal handlers to have the signature + 'void (int)'. Update the definition to take an int parameter so it + matches the declaration in rstat_main.c and the function-pointer + type signal() expects. The body does not use the signal number; + the unused parameter is harmless. +Author: Azeez Syed +Bug-Debian: https://bugs.debian.org/1097808 +Forwarded: no +Last-Update: 2026-05-23 +--- a/rstat_proc.c ++++ b/rstat_proc.c +@@ -65,7 +65,7 @@ union + struct statsusers s5; + } stats_all; + +-void test_connect() ++void test_connect(int sig) + { + if (inetd_connect != 0) { + exit (0); diff -Nru rstatd-4.0.1/debian/patches/series rstatd-4.0.1/debian/patches/series --- rstatd-4.0.1/debian/patches/series 2021-11-21 14:10:04.000000000 +0530 +++ rstatd-4.0.1/debian/patches/series 2026-05-23 12:27:13.000000000 +0530 @@ -2,3 +2,7 @@ 02-654276-get_disk26.patch 04-fix-no-format.patch 05-997260-Makefile.in.patch +06-fix-ftbfs-gcc15-rup.patch +07-fix-ftbfs-gcc15-rsysinfo.patch +08-fix-ftbfs-gcc15-rstat_main.patch +09-fix-ftbfs-gcc15-rstat_proc.patch