Branch: refs/heads/main
Home:
https://github.com/lxc/lxc
Commit: c2809b067bbd5c63f0f78a5acd6f7af4e77e584c
https://github.com/lxc/lxc/commit/c2809b067bbd5c63f0f78a5acd6f7af4e77e584c
Author: Adrian Ratiu <
adrian...@collabora.com>
Date: 2026-07-22 (Wed, 22 Jul 2026)
Changed paths:
M src/lxc/confile.c
M src/lxc/confile.h
M src/lxc/confile_utils.c
M src/lxc/pam/pam_cgfs.c
M src/lxc/storage/nbd.c
M src/lxc/storage/zfs.c
Log Message:
-----------
tree-wide: fix const-correctness issues exposed by glibc 2.43
glibc 2.43 implements strchr(3), strrchr(3) and strstr(3) as
C23-style _Generic macros which propagate the const qualifier
of the input string to the return type.
For example, a 'const char *' input now produces 'const char *'
output types and vice-versa (non-const -> non-const).
Building with clang and -Werror=incompatible-pointer-types fails:
src/lxc/confile.c:2690:4: error: assigning to 'char *' from
'const char *' discards qualifiers
[-Werror,-Wincompatible-pointer-types-discards-qualifiers]
Constify the result pointers where they are only read. Where the
code intentionally writes through the result into caller-owned
writable storage, drop the bogus const from the parameter instead
of casting it away: update_hwaddr() (and thus its caller
append_unexp_config_line()) modify the string in-place via
rand_complete_hwaddr(), so 'char *' is the honest type. The two
call sites already pass writable buffers (a strdup()'d line and an
internally built one), so no cast is needed.
The one remaining cast is in cgroup1-only pam_cgfs code
(cgv1_handle_cpuset_hierarchy) where the writable buffer is passed
down through a const 'cgroup' parameter; that hierarchy is slated
for removal, so the minimal cast is kept there.
This is just a build fix, the runtime behavior is unchanged.
Fixes: #4710
Signed-off-by: Adrian Ratiu <
adrian...@collabora.com>
Commit: fcc9426812af005714e09f4c7f3c8748c82a322b
https://github.com/lxc/lxc/commit/fcc9426812af005714e09f4c7f3c8748c82a322b
Author: Stéphane Graber <
stgr...@stgraber.org>
Date: 2026-07-23 (Thu, 23 Jul 2026)
Changed paths:
M src/lxc/confile.c
M src/lxc/confile.h
M src/lxc/confile_utils.c
M src/lxc/pam/pam_cgfs.c
M src/lxc/storage/nbd.c
M src/lxc/storage/zfs.c
Log Message:
-----------
Merge pull request #4711 from 10ne1/glibc-2.43-const-fixes
tree-wide: fix const-correctness issues exposed by glibc 2.43
Compare:
https://github.com/lxc/lxc/compare/af38dcf5837d...fcc9426812af
To unsubscribe from these emails, change your notification settings at
https://github.com/lxc/lxc/settings/notifications