xmlrpc-c: Stick to C17
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
@@ -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
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' onwardssrcdir/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' onwardssrcdir/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
Can be adopted.
Quoted 30 lines
Signed-off-by mark.yang <[email protected]>--- 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@@ -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]]
-=-=-=-=-=-=-=-=-=-=-=-