Skip to content

Conversation

@stanhu
Copy link

@stanhu stanhu commented Jul 27, 2025

This fixes a compilation issue in GCC 15 due stdbool.h not being included when -std=c99 is in use. This occurs because the standard configure script shipped with older Ruby versions (prior to 3.4.5 and 3.3.9) do not properly test for stdbool.h on C23 compilers (https://bugs.ruby-lang.org/issues/21340).

The append_cflags approach is recommended over modifying CFLAGS since it ensures compatibility across different build environments by checking whether the flag is acceptable.

Similar changes:

This fixes a compilation issue in GCC 15 due `stdbool.h` not being
included when `-std=c99` is in use. This occurs because the standard
`configure` script shipped with older Ruby versions (prior to 3.4.5 and
3.3.9) do not properly test for `stdbool.h` on C23 compilers
(https://bugs.ruby-lang.org/issues/21340).

The `append_cflags` approach is recommended over modifying CFLAGS since
it ensures compatibility across different build environments by checking
whether the flag is acceptable.

Similar changes:

* socketry/io-event#137
* mongodb/bson-ruby#355
Copy link
Owner

@kwilczynski kwilczynski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thank you!

@kwilczynski kwilczynski merged commit 3b19dd8 into kwilczynski:main Aug 5, 2025
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