Skip to content

Fix build failure with glibc 2.43#292

Merged
vathpela merged 1 commit intorhboot:mainfrom
xry111:xry111/glibc-2.43
Mar 3, 2026
Merged

Fix build failure with glibc 2.43#292
vathpela merged 1 commit intorhboot:mainfrom
xry111:xry111/glibc-2.43

Conversation

@xry111
Copy link
Contributor

@xry111 xry111 commented Feb 13, 2026

In glibc 2.43, some _Generic macros have been added to preserve the constness of pointers. They are following C23 but also available when _GNU_SOURCE is defined (as we are doing). The preserved constness can trigger some -Wdiscarded-qualifiers warnings, which are turned to errors with -Werror (that we enable by default).

The find_parent_devpath function really modifies the buffer so we have to drop the const qualifer for it. For other cases, simply add the missed const qualifer.

In glibc 2.43, some _Generic macros have been added to preserve the
constness of pointers.  They are following C23 but also available when
_GNU_SOURCE is defined (as we are doing).  The preserved constness can
trigger some -Wdiscarded-qualifiers warnings, which are turned to errors
with -Werror (that we enable by default).

The find_parent_devpath function really modifies the buffer so we have
to drop the const qualifer for it.  For other cases, simply add the
missed const qualifer.

Signed-off-by: Xi Ruoyao <xry111@xry111.site>
@vathpela vathpela merged commit f521cd7 into rhboot:main Mar 3, 2026
5 checks passed
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