qemu-cr16/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>
2025-12-09 21:00:15 +01:00
..
Kconfig tpm: Move backend code under the 'backends/' directory 2020-06-19 07:25:55 -04:00
meson.build meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
tpm_backend.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
tpm_emulator.c migration: vmsd errp handlers: return bool 2025-11-03 16:04:10 -05:00
tpm_int.h include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
tpm_ioctl.h tpm: Use new ptm_cap_n structure for PTM_GET_CAPABILITY 2024-10-18 07:53:11 -04:00
tpm_passthrough.c Fix const qualifier build errors with recent glibc 2025-12-09 21:00:15 +01:00
tpm_util.c include/system: Move exec/memory.h to system/memory.h 2025-04-23 14:08:21 -07:00
trace-events tpm: Use new ptm_cap_n structure for PTM_GET_CAPABILITY 2024-10-18 07:53:11 -04:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00