Repository navigation
[Build] Add missing <errno.h> include for errno - #2042
Open
nuclearcat wants to merge 1 commit into
Open
nuclearcat wants to merge 1 commit into
nuclearcat wants to merge 1 commit into
Conversation
mos_query_device_type() uses errno without including its declaring header. With Clang 22 and libc++ 22, -D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES=1 exposes this as an undeclared identifier when compiling hwinfo_linux.cpp and mos_auxtable_mgr.cpp. Include <errno.h> directly in mos_bufmgr_api.h alongside the existing C headers. Both translation units compile with transitive includes disabled after this change. Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
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.
mos_query_device_type()useserrno, butmos_bufmgr_api.hdoes not include its declaring header.With Clang 22 and libc++ 22, enabling
-D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES=1makes bothhwinfo_linux.cppandmos_auxtable_mgr.cppfail with:Include
<errno.h>directly in the header that uses it, alongside the existing C headers. No functional change.Validation against master
2ad1459d2f80af7b034499238c0022ff00652b70:git diff --checkpasses.These were targeted checks with ChromeOS Clang/libc++ 22 and Ubuntu host C headers; no full driver build or hardware tests were run.
This also covers the
<errno.h>hunk in ChromeOS CL 7964643.AI assistance used for investigation, validation, and preparing this PR.