Add missing <stdbool.h> include to time.h (backport #423) - #427
Open
mergify[bot] wants to merge 1 commit into
Open
Add missing <stdbool.h> include to time.h (backport #423)#427mergify[bot] wants to merge 1 commit into
mergify[bot] wants to merge 1 commit into
Conversation
The time.h header uses `bool` for the return type of `rmw_time_equal()` but does not directly include `<stdbool.h>`. This was previously provided transitively through `rcutils/time.h` -> `rcutils/types.h`, but ros2/rcutils#580 narrowed that include chain, breaking compilation of downstream C translation units. Signed-off-by: Siddhartha Banerjee <sbanerjee@overland.ai> (cherry picked from commit 5f21342)
Author
|
Tick the box to add this pull request to the merge queue (same as
|
fujitatomoya
approved these changes
Aug 6, 2026
Collaborator
|
Pulls: #427 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
rmw/include/rmw/time.husesboolas the return type ofrmw_time_equal()(line 60) but does not include<stdbool.h>. This previously worked becausercutils/time.htransitively pulled in<stdbool.h>viarcutils/types.h→hash_map.h→allocator.h.After ros2/rcutils#580 (commit 47a44cb, backported to jazzy as #583) narrowed the include in
rcutils/time.hfromrcutils/types.htorcutils/types/rcutils_ret.h, this transitive chain is broken. Any C translation unit that includesrmw/time.hnow fails to compile:The fix is to add #include <stdbool.h> to rmw/time.h.
Verification
rcutils:jazzyandrmw:jazzy(unfixed) and the above C file in a test C packagecolcon buildin the workspace reproduced the above errorDid you use Generative AI?
Claude Opus 4.6
This is an automatic backport of pull request #423 done by Mergify.