Bug#1097938: startpar: ftbfs with GCC-15

Mark Hindley mark at hindley.org.uk
Fri Sep 5 18:11:53 BST 2025


Control: tags -1 patch

Jesse,

Does something like this help?

Mark

commit 059cdd2838a912abe9e915601d44be99d4913879
Author: Mark Hindley <mark at hindley.org.uk>
Date:   Mon Aug 25 14:39:10 2025 +0100

    Use stdbool.h, fixes FTBFS with gcc-15.
    
    Closes: #1097938

diff --git a/startpar.c b/startpar.c
index 1aa9ce8..ae6f0ad 100644
--- a/startpar.c
+++ b/startpar.c
@@ -53,6 +53,7 @@
 #include <time.h>
 #include <fcntl.h>
 #include <errno.h>
+#include <stdbool.h>
 #include <string.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -92,7 +93,6 @@
        __result; }))
 #endif
 
-typedef enum _boolean {false, true} boolean;
 extern char *optarg;
 extern int optind;
 
@@ -106,7 +106,7 @@ static struct {
 } sz;
 static sig_atomic_t wzok;
 static char *arg;
-static boolean isstart;
+static bool isstart;
 static struct sigaction sa;
 static struct timeval glastio;
 static struct timeval now;
@@ -333,7 +333,7 @@ void writebuf(struct prg *p)
   glastio = now;
 }
 
-static int checksystem(const int par, const boolean start, const boolean limit)
+static int checksystem(const int par, const bool start, const bool limit)
 {
   const      int pg_size       = sysconf(_SC_PAGESIZE);
   #ifdef __FreeBSD__
@@ -388,12 +388,12 @@ static int checksystem(const int par, const boolean start, const boolean limit)
     return newpar;
 }
 
-static inline int checklimit(const int par, const boolean start)
+static inline int checklimit(const int par, const bool start)
 {
   return checksystem(par, start, true);
 }
 
-static inline int checkpar(const int par, const boolean start)
+static inline int checkpar(const int par, const bool start)
 {
   return checksystem(par, start, false);
 }



More information about the Debian-init-diversity mailing list