]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tree-wide: Fix constness issues with newer glibc (#39896)
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 25 Nov 2025 23:32:54 +0000 (00:32 +0100)
committerGitHub <noreply@github.com>
Tue, 25 Nov 2025 23:32:54 +0000 (00:32 +0100)
Latest glibc uses _Generic to have strstr() and other functions return
const char* or char* based on whether the input is a const char* or a
char*. This causes build failures as we previously always expected a
char*.

Let's fix the compilation failures and add our own macros similar to
glibc's to have string functions that return a mutable or const pointer
depending on the input.

1  2 
src/basic/time-util.c

Simple merge