Skip to content

Fix glibc-2.43 constness warnings#867

Open
hhoffstaette wants to merge 1 commit intoRsyncProject:masterfrom
hhoffstaette:glibc-constness
Open

Fix glibc-2.43 constness warnings#867
hhoffstaette wants to merge 1 commit intoRsyncProject:masterfrom
hhoffstaette:glibc-constness

Conversation

@hhoffstaette
Copy link
Copy Markdown
Contributor

@hhoffstaette hhoffstaette commented Apr 5, 2026

Glibc 2.43 added C23 const-preserving overloads to various string functions, which change the return type depending on the constness of the argument(s). Currently this leads to warnings from calls to strtok() or strchr() which can break the build e.g. when -Werror is used. Fix this by properly declaring the respective variable types.

Glibc 2.43 added C23 const-preserving overloads to various string functions,
which change the return type depending on the constness of the argument(s).
Currently this leads to warnings from calls to strtok() or strchr().
Fix this by properly declaring the respective variable types.

Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
@hhoffstaette
Copy link
Copy Markdown
Contributor Author

hhoffstaette commented Apr 5, 2026

zlib on MacOS won't build with -std=gnu23 because of old-style protoypes, but that's a zlib problem. It only now surfaces because (presumably) the Homebew action already has autoconf-2.73, which tries to force C23 and therefore makes clang reject old prototypes.
See e.g. https://bugs.gentoo.org/972320

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.

1 participant