This is an automated email from the ASF dual-hosted git repository.

garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-daemon.git


The following commit(s) were added to refs/heads/master by this push:
     new b164686f Fix native build with C23 boolean keywords (#319)
b164686f is described below

commit b164686fb33d94508078a1b4ee56dfdcdcc853fa
Author: Gary Gregory <[email protected]>
AuthorDate: Tue Nov 3 11:20:46 2026 -0500

    Fix native build with C23 boolean keywords (#319)
    
    Use stdbool.h for C99 and newer to avoid redefining bool, true, and
    false under C23. Preserve the existing fallback for older C compilers.
---
 src/native/unix/native/jsvc.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/native/unix/native/jsvc.h b/src/native/unix/native/jsvc.h
index c4af927a..98830930 100644
--- a/src/native/unix/native/jsvc.h
+++ b/src/native/unix/native/jsvc.h
@@ -24,8 +24,8 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 
-/* Definitions for booleans */
-#ifdef OS_DARWIN
+/* Use standard booleans where available, including C23 keywords. */
+#if defined(OS_DARWIN) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 
199901L)
 #include <stdbool.h>
 #else
 typedef enum {

Reply via email to