Skip to content

src/olsr_types.h: fix boolean type check with C23 - #139

Merged
mathiashro merged 1 commit into
OLSR:masterfrom
tpetazzoni:gcc15-fix
Aug 26, 2026
Merged

src/olsr_types.h: fix boolean type check with C23#139
mathiashro merged 1 commit into
OLSR:masterfrom
tpetazzoni:gcc15-fix

Conversation

@tpetazzoni

Copy link
Copy Markdown
Contributor

GCC 15 defaults to GNU C23. In C23, bool, true and false are keywords, and <stdbool.h> no longer defines __bool_true_false_are_defined. Therefore the existing preprocessor check incorrectly rejects a valid C23 environment.

Keep the check for older C standards, where these identifiers must be provided as macros by <stdbool.h> or by the GNU C fallback.

GCC 15 defaults to GNU C23. In C23, bool, true and false are keywords,
and <stdbool.h> no longer defines __bool_true_false_are_defined. Therefore
the existing preprocessor check incorrectly rejects a valid C23 environment.

Keep the check for older C standards, where these identifiers must be
provided as macros by <stdbool.h> or by the GNU C fallback.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
@mathiashro
mathiashro merged commit 4c28c84 into OLSR:master Aug 26, 2026
@mathiashro

Copy link
Copy Markdown
Contributor

Thank you @tpetazzoni

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants