diff mbox series

[meta-mingw] mingw-libgnurx: use -std=gnu17 for compilation

Message ID 20251016034336.115357-1-changqing.li@windriver.com
State New
Headers show
Series [meta-mingw] mingw-libgnurx: use -std=gnu17 for compilation | expand

Commit Message

Changqing Li Oct. 16, 2025, 3:43 a.m. UTC
From: Changqing Li <changqing.li@windriver.com>

mingw-libgnurx does not build under -std=gnu23 which is the default of
gcc15. Forcing -std=gnu17 fixes these build errors:
    In file included from ../sources/mingw-libgnurx-2.5.1/regex.c:61:
../sources/mingw-libgnurx-2.5.1/regex_internal.h:49:16: error: cannot use keyword 'false' as enumeration constant
   49 | typedef enum { false, true } bool;
      |                ^~~~~
../sources/mingw-libgnurx-2.5.1/regex_internal.h:49:16: note: 'false' is a keyword with '-std=c23' onwards
../sources/mingw-libgnurx-2.5.1/regex_internal.h:49:30: error: expected ';', identifier or '(' before 'bool'
   49 | typedef enum { false, true } bool;
      |                              ^~~~

[1] https://gcc.gnu.org/gcc-15/changes.html

Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 recipes-support/mingw-libgnurx/mingw-libgnurx_2.5.1.bb | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/recipes-support/mingw-libgnurx/mingw-libgnurx_2.5.1.bb b/recipes-support/mingw-libgnurx/mingw-libgnurx_2.5.1.bb
index 4547298..03a61a7 100644
--- a/recipes-support/mingw-libgnurx/mingw-libgnurx_2.5.1.bb
+++ b/recipes-support/mingw-libgnurx/mingw-libgnurx_2.5.1.bb
@@ -11,6 +11,8 @@  SRC_URI[sha256sum] = "7147b7f806ec3d007843b38e19f42a5b7c65894a57ffc297a76b0dcd5f
 
 inherit autotools
 
+CFLAGS += "-std=gnu17"
+
 # Specify any options you want to pass to the configure script using EXTRA_OECONF:
 EXTRA_OECONF = ""