Skip to content

Conversation

@ojab
Copy link
Contributor

@ojab ojab commented Jan 27, 2026

Since [0] some standard library functions (e. g. memchr) are const preserving in C23-mode, i. e. return const char * instead of char * if const char * was passed.
gcc-15 uses C23 by default and currently build with gcc-15 & glibc-2.43 fails.

[0] https://sourceware.org/git/?p=glibc.git;a=commit;h=cd748a63ab1a7ae846175c532a3daab341c62690

Since [0] some standard library functions (e. g. `memchr`) are const
preserving in C23-mode, i. e. return `const char *` instead of `char *` if `const
char *` was passed.
gcc-15 uses C23 by default and currently build with gcc-15 &
glibc-2.43 fails.

[0] https://sourceware.org/git/?p=glibc.git;a=commit;h=cd748a63ab1a7ae846175c532a3daab341c62690
@classabbyamp
Copy link
Member

xbps is written as C99, wouldn't it make more sense to add -std=c99 to the base cflags?

@ojab
Copy link
Contributor Author

ojab commented Jan 27, 2026

IMHO wouldn't hurt to build cleanly in C23-mode, but can change cflags instead if uintptr_t casts are too ugly.

@leahneukirchen
Copy link
Member

The casts are wrong, instead the function arguments should not be made const.

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.

3 participants