[native] Fix build of strrchr#124372
Merged
ManickaP merged 1 commit intodotnet:mainfrom Feb 13, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a build break in the vendored libunwind elfxx.c after glibc 2.43’s C23-related changes that make strrchr return const char* when passed a const char*.
Changes:
- Update the local variable receiving
strrchr(file, '/')fromchar*toconst char*. - Remove a couple of trailing whitespace instances in designated initializers.
Member
|
Please upstream it to https://github.com/libunwind/libunwind and update |
Member
|
It has already been merged upstream: libunwind/libunwind#940. You can simply add:
right after this line: This helps with patch accounting in the next major update. |
janvorli
reviewed
Feb 13, 2026
richlander
pushed a commit
to richlander/runtime
that referenced
this pull request
Feb 14, 2026
After the recent update of glic from 2.42 -> 2.43, `strrchr` returns `const char*` if the arg is `const char*`, see https://sourceware.org/pipermail/libc-alpha/2026-January/174374.html: > * For ISO C23, the functions bsearch, memchr, strchr, strpbrk, strrchr, strstr, wcschr, wcspbrk, wcsrchr, wcsstr and wmemchr that return pointers into their input arrays now have definitions as macros that return a pointer to a const-qualified type when the input argument is a pointer to a const-qualified type. The standard `build.sh clr+libs -rc release` was failing for me on line 933: ```c p = strrchr (file, '/'); ``` so I change the type of `p` to `const char*`. I'm not sure this is the right way to fix this, so please let me know how else could I do it. But without any change, I'm not able to build the runtime. cc @janvorli
iremyux
pushed a commit
to iremyux/dotnet-runtime
that referenced
this pull request
Mar 2, 2026
After the recent update of glic from 2.42 -> 2.43, `strrchr` returns `const char*` if the arg is `const char*`, see https://sourceware.org/pipermail/libc-alpha/2026-January/174374.html: > * For ISO C23, the functions bsearch, memchr, strchr, strpbrk, strrchr, strstr, wcschr, wcspbrk, wcsrchr, wcsstr and wmemchr that return pointers into their input arrays now have definitions as macros that return a pointer to a const-qualified type when the input argument is a pointer to a const-qualified type. The standard `build.sh clr+libs -rc release` was failing for me on line 933: ```c p = strrchr (file, '/'); ``` so I change the type of `p` to `const char*`. I'm not sure this is the right way to fix this, so please let me know how else could I do it. But without any change, I'm not able to build the runtime. cc @janvorli
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
After the recent update of glic from 2.42 -> 2.43,
strrchrreturnsconst char*if the arg isconst char*, see https://sourceware.org/pipermail/libc-alpha/2026-January/174374.html:The standard
build.sh clr+libs -rc releasewas failing for me on line 933:so I change the type of
ptoconst char*.I'm not sure this is the right way to fix this, so please let me know how else could I do it. But without any change, I'm not able to build the runtime.
cc @janvorli