From 5b5889ee5f57e6159f44d18b13c44083772595e8 Mon Sep 17 00:00:00 2001 From: Yegor Yefremov Date: Fri, 25 Jul 2025 14:07:43 +0200 Subject: [PATCH] package/libxmlrpc: fix boolean definitions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Don't define boolean macros for C23 standard as they are implemented as keywords. Fixes the following error: make[2]: Entering directory '/home/user/Documents/versioned/oss/xmlrpc-c/lib/util' gcc -c -DNDEBUG -pthread -Wall -W -Wno-uninitialized -Wundef -Wno-unknown-pragmas -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wimplicit -fno-common -g -O3 -Isrcdir/lib/util/include -I/home/user/Documents/versioned/oss/xmlrpc-c casprintf.c In file included from casprintf.c:9: srcdir/lib/util/include/bool.h:13:5: error: cannot use keyword ‘false’ as enumeration constant 13 | false = 0, | ^~~~~ srcdir/lib/util/include/bool.h:13:5: note: ‘false’ is a keyword with ‘-std=c23’ onwards srcdir/lib/util/include/bool.h:15:3: error: expected ‘;’, identifier or ‘(’ before ‘bool’ 15 | } bool; | ^~~~ srcdir/lib/util/include/bool.h:15:3: warning: useless type name in empty declaration Upstream: https://sourceforge.net/p/xmlrpc-c/code/3318/ Signed-off-by: Yegor Yefremov Reviewed-by: Thomas Petazzoni Signed-off-by: Julien Olivain --- .../0001-Fix-boolean-definitions.patch | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 package/libxmlrpc/0001-Fix-boolean-definitions.patch diff --git a/package/libxmlrpc/0001-Fix-boolean-definitions.patch b/package/libxmlrpc/0001-Fix-boolean-definitions.patch new file mode 100644 index 0000000000..0fdfdf7f03 --- /dev/null +++ b/package/libxmlrpc/0001-Fix-boolean-definitions.patch @@ -0,0 +1,25 @@ +Index: lib/util/include/bool.h +=================================================================== +Don't define boolean macros for C23 standard as they are implemented +as keywords. + +Upstream: https://sourceforge.net/p/xmlrpc-c/code/3318/ + +Signed-off-by: Yegor Yefremov + +diff --git a/lib/util/include/bool.h b/lib/util/include/bool.h +--- a/lib/util/include/bool.h (revision 3316) ++++ b/lib/util/include/bool.h (working copy) +@@ -5,7 +5,11 @@ + collision. + */ + +-#ifndef __cplusplus ++#ifdef __cplusplus ++/* bool has always been part of the C++ language */ ++#elif __STDC_VERSION__ >= 202311L ++/* bool is part of the C23 standard */ ++#else + /* At least the GNU compiler defines __bool_true_false_are_defined */ + #ifndef __bool_true_false_are_defined + #define __bool_true_false_are_defined