Description: make it compile with gcc15
Index: rlpr/lib/error.c
===================================================================
--- rlpr.orig/lib/error.c	2025-09-08 23:48:47.951423166 +0200
+++ rlpr/lib/error.c	2025-09-15 23:16:30.700866082 +0200
@@ -26,6 +26,7 @@
 
 #if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC
 # if __STDC__
+#  include <stdlib.h>
 #  include <stdarg.h>
 #  define VA_START(args, lastarg) va_start(args, lastarg)
 # else
@@ -43,7 +44,7 @@
 # include <string.h>
 #else
 #include <string.h>
-void exit ();
+void exit (int);
 #endif
 
 #ifndef _
@@ -79,7 +80,7 @@
 
 # if HAVE_STRERROR
 #  ifndef strerror		/* On some systems, strerror is a macro */
-char *strerror ();
+char *strerror (int);
 #  endif
 # else
 static char *
Index: rlpr/lib/xstrtol.h
===================================================================
--- rlpr.orig/lib/xstrtol.h	2025-09-08 23:46:46.951309147 +0200
+++ rlpr/lib/xstrtol.h	2025-09-09 00:04:15.776160938 +0200
@@ -8,6 +8,7 @@
 #  define __ZLONG_MAX ULONG_MAX
 # else
 #  define __xstrtol xstrtol
+
 #  define __strtol strtol
 #  define __unsigned /* empty */
 #  define __ZLONG_MAX LONG_MAX
Index: rlpr/lib/xmalloc.c
===================================================================
--- rlpr.orig/lib/xmalloc.c	2025-09-08 23:46:46.951309147 +0200
+++ rlpr/lib/xmalloc.c	2025-09-15 22:57:30.543959251 +0200
@@ -27,14 +27,15 @@
 
 #include <sys/types.h>
 
-#if STDC_HEADERS
+// we do have stdlib.h
+//#if STDC_HEADERS
 # include <stdlib.h>
-#else
-VOID *calloc ();
-VOID *malloc ();
-VOID *realloc ();
-void free ();
-#endif
+//#else
+//VOID *calloc ();
+//VOID *malloc ();
+//VOID *realloc ();
+//void free ();
+//#endif
 
 #if ENABLE_NLS
 # include <libintl.h>
@@ -70,8 +71,7 @@
 #endif
 
 static VOID *
-fixup_null_alloc (n)
-     size_t n;
+fixup_null_alloc (size_t n)
 {
   VOID *p;
 
@@ -86,8 +86,7 @@
 /* Allocate N bytes of memory dynamically, with error checking.  */
 
 VOID *
-xmalloc (n)
-     size_t n;
+xmalloc (size_t n)
 {
   VOID *p;
 
@@ -100,8 +99,7 @@
 /* Allocate memory for N elements of S bytes, with error checking.  */
 
 VOID *
-xcalloc (n, s)
-     size_t n, s;
+xcalloc (size_t n, size_t s)
 {
   VOID *p;
 
@@ -116,9 +114,7 @@
    If P is NULL, run xmalloc.  */
 
 VOID *
-xrealloc (p, n)
-     VOID *p;
-     size_t n;
+xrealloc (VOID *p, size_t n)
 {
   if (p == 0)
     return xmalloc (n);
Index: rlpr/lib/xstrdup.c
===================================================================
--- rlpr.orig/lib/xstrdup.c	2025-09-08 23:46:46.951309147 +0200
+++ rlpr/lib/xstrdup.c	2025-09-15 22:58:16.639995095 +0200
@@ -35,8 +35,7 @@
 /* Return a newly allocated copy of STRING.  */
 
 char *
-xstrdup (string)
-     char *string;
+xstrdup (char *string)
 {
   return strcpy (xmalloc (strlen (string) + 1), string);
 }
Index: rlpr/lib/xstrtol.c
===================================================================
--- rlpr.orig/lib/xstrtol.c	2025-09-08 23:46:46.951309147 +0200
+++ rlpr/lib/xstrtol.c	2025-09-15 23:11:05.956602811 +0200
@@ -65,17 +65,17 @@
 	}								\
       while (0)
 
-__unsigned long int __strtol ();
+__unsigned long int __strtol (const char *, char **, int);
 
 /* FIXME: comment.  */
 
 strtol_error
-__xstrtol (s, ptr, base, val, valid_suffixes)
-     const char *s;
-     char **ptr;
-     int base;
-     __unsigned long int *val;
-     const char *valid_suffixes;
+__xstrtol (const char *s, char **ptr, int base, __unsigned long int *val, const char *valid_suffixes)
+//     const char *s;
+//     char **ptr;
+//     int base;
+//     __unsigned long int *val;
+//     const char *valid_suffixes;
 {
   char *t_ptr;
   char **p;
Index: rlpr/src/rlprd.c
===================================================================
--- rlpr.orig/src/rlprd.c	2025-09-08 23:48:47.935423151 +0200
+++ rlpr/src/rlprd.c	2025-09-15 23:24:18.149251705 +0200
@@ -56,8 +56,10 @@
 static int		process_client(int, struct sockaddr_in *);
 static int		register_sigchld(void);
 static int		daemonize(void);
-static RETSIGTYPE	catch_sigchld(int);
-static RETSIGTYPE	graceful_shutdown(int);
+//XXX static RETSIGTYPE	catch_sigchld(int);
+//XXX static RETSIGTYPE	graceful_shutdown(int);
+static void	catch_sigchld(int);
+static void	graceful_shutdown(int);
 
 int
 main(int argc, char *argv[])
@@ -248,7 +250,8 @@
 }
 
 /* ARGSUSED */
-static RETSIGTYPE
+//XXX static RETSIGTYPE
+static void
 catch_sigchld(int unused)
 {
     while (waitpid(-1, 0, WNOHANG) > 0)
@@ -256,7 +259,8 @@
 }
 
 /* ARGSUSED */
-static RETSIGTYPE
+//XXX static RETSIGTYPE
+static void
 graceful_shutdown(int unused)
 {
     struct component	*comp;
