On 12/9/25 20:17, Philippe Mathieu-Daudé wrote:
On 9/12/25 18:43, Cédric Le Goater wrote:
A recent change in glibc 2.42.9000 [1] changes the return type of
strstr() and other string functions to be 'const char *' when the
input is a 'const char *'.
This breaks the build in various files with errors such as :
error: initialization discards 'const' qualifier from pointer target type
[-Werror=discarded-qualifiers]
208 | char *pidstr = strstr(filename, "%");
| ^~~~~~
Fix this by changing the type of the variables that store the result
of these functions to 'const char *'.
[1]
https://sourceware.org/git/?p=glibc.git;a=commit;h=cd748a63ab1a7ae846175c532a3daab341c62690
Signed-off-by: Cédric Le Goater <[email protected]>
---
Most changes are straight forward apart from vubr_parse_host_port.
Better keep the vubr_parse_host_port() change in a distinct patch (the
change isn't really what this commit describes).
A rewrite is preferable anyhow.
For the others:
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Thanks,
C.
Please check.
Thanks,
C.
backends/tpm/tpm_passthrough.c | 2 +-
block/vmdk.c | 2 +-
block/vvfat.c | 2 +-
gdbstub/gdbstub.c | 2 +-
qga/commands-linux.c | 7 ++++---
tests/vhost-user-bridge.c | 2 +-
ui/ui-hmp-cmds.c | 2 +-
util/log.c | 2 +-
8 files changed, 11 insertions(+), 10 deletions(-)