You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qemu/backends/tpm
Cédric Le Goater 326e620fc0 Fix const qualifier build errors with recent glibc
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 <clg@redhat.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251209174328.698774-1-clg@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
4 days ago
..
Kconfig
meson.build meson: Replace softmmu_ss -> system_ss 3 years ago
tpm_backend.c include: Rename sysemu/ -> system/ 12 months ago
tpm_emulator.c migration: vmsd errp handlers: return bool 1 month ago
tpm_int.h include: Rename sysemu/ -> system/ 12 months ago
tpm_ioctl.h tpm: Use new ptm_cap_n structure for PTM_GET_CAPABILITY 1 year ago
tpm_passthrough.c Fix const qualifier build errors with recent glibc 4 days ago
tpm_util.c include/system: Move exec/memory.h to system/memory.h 8 months ago
trace-events tpm: Use new ptm_cap_n structure for PTM_GET_CAPABILITY 1 year ago
trace.h trace: switch position of headers to what Meson requires 5 years ago