Skip to contentSkip to conversation

xmlrpc-c: Stick to C17

PATCH In review [email protected] 2 participants 2 messages Apr 1, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xmlrpc-c: Stick to C17

From: "mark.yang" <[email protected]>

* Fix build error with gcc-15.0.1
http://errors.yoctoproject.org/Errors/Details/850147/
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 In file included from sleep.c:2:
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;
| ^~~~

In C23, bool, true, and false are added as reserved keywords, causing build errors. However, modifying the source code just for this would be risky, so we set the C standard to C17.

---
 meta-oe/recipes-devtools/xmlrpc-c/xmlrpc-c_1.64.0.bb | 5 +++++
 1 file changed, 5 insertions(+)
meta-oe/recipes-devtools/xmlrpc-c/xmlrpc-c_1.64.0.bb +5 -0
index 62ba0f53e6..cca745cd51 100644
@@ -46,3 +46,8 @@ do_install:append:class-target() {
 BBCLASSEXTEND = "native"
 
 CLEANBROKEN = "1"
+
+# http://errors.yoctoproject.org/Errors/Details/850147/
+# 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'
+CFLAGS += "-std=gnu17"
Signature · 1 line
2.34.1
#1 lore raw
Quoted 22 lines · mark.yang via lists.openembedded.org

From: "mark.yang" <[email protected]>

* Fix build error with gcc-15.0.1
http://errors.yoctoproject.org/Errors/Details/850147/
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 In file included from sleep.c:2:
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;
| ^~~~

Quoted 3 lines

In C23, bool, true, and false are added as reserved keywords, causing build errors. However, modifying the source code just for this would be risky, so we set the C standard to C17.

See if something like this

https://git.openembedded.org/openembedded-core/tree/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-libext2fs-fix-std-c23-build-failure.patch

Can be adopted.

Quoted 30 lines
---
 meta-oe/recipes-devtools/xmlrpc-c/xmlrpc-c_1.64.0.bb | 5 +++++
 1 file changed, 5 insertions(+)
meta-oe/recipes-devtools/xmlrpc-c/xmlrpc-c_1.64.0.bb +5 -1
index 62ba0f53e6..cca745cd51 100644
@@ -46,3 +46,8 @@ do_install:append:class-target() {
 BBCLASSEXTEND = "native"
 
 CLEANBROKEN = "1"
+
+# http://errors.yoctoproject.org/Errors/Details/850147/
+# 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'
+CFLAGS += "-std=gnu17"
--

2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#116474): https://lists.openembedded.org/g/openembedded-devel/message/116474
Mute This Topic: https://lists.openembedded.org/mt/112023126/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-