qemu-cr16/util
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
..
aio-posix.c aio-posix: add aio_add_sqe() API for user-defined io_uring requests 2025-11-11 22:06:09 +01:00
aio-posix.h aio-posix: add aio_add_sqe() API for user-defined io_uring requests 2025-11-11 22:06:09 +01:00
aio-wait.c aio-wait: avoid AioContext lock in aio_wait_bh_oneshot() 2023-05-10 14:15:13 +02:00
aio-win32.c aio: add errp argument to aio_context_setup() 2025-11-11 22:06:09 +01:00
aiocb.c
async.c block/io_uring: use aio_add_sqe() 2025-11-11 22:06:09 +01:00
atomic64.c
base64.c
bitmap.c
bitops.c replace TABs with spaces 2023-03-20 12:43:50 +01:00
block-helpers.c block: Adjust check_block_size() signature 2024-10-18 15:03:35 +02:00
block-helpers.h block: Adjust check_block_size() signature 2024-10-18 15:03:35 +02:00
buffer.c
bufferiszero.c util/bufferiszero: Split out host include files 2024-06-19 12:47:11 -07:00
cacheflush.c buildsys: Remove support for 32-bit PPC hosts 2025-10-16 14:58:53 -07:00
chardev_open.c util/char_dev: Add open_cdev() 2023-12-19 19:03:38 +01:00
compatfd.c
coroutine-sigaltstack.c osdep: set _FORTIFY_SOURCE=2 when optimization is enabled 2023-10-04 09:52:06 -04:00
coroutine-ucontext.c coroutine-ucontext: Save fake stack for pooled coroutine 2024-01-22 11:00:12 -05:00
coroutine-wasm.c util: Add coroutine backend for emscripten 2025-05-06 16:02:04 +02:00
coroutine-windows.c build: move coroutine backend selection to meson 2023-05-18 08:53:52 +02:00
cpuinfo-aarch64.c util/cpuinfo: Make use of elf_aux_info(3) on OpenBSD 2024-07-30 07:59:23 +10:00
cpuinfo-i386.c cpuinfo/i386: Detect GFNI as an AVX extension 2025-09-04 09:49:23 +02:00
cpuinfo-loongarch.c util/loongarch64: Detect LASX vector support 2024-06-19 10:55:12 -07:00
cpuinfo-ppc.c util/cpuinfo: Make use of elf_aux_info(3) on OpenBSD 2024-07-30 07:59:23 +10:00
cpuinfo-riscv.c util/cpuinfo-riscv: Detect Zbs 2025-01-16 20:57:17 -08:00
crc-ccitt.c
crc32c.c igb: Implement Rx SCTP CSO 2023-05-23 15:20:15 +08:00
cutils.c util/cutils: Remove unused qemu_get_exec_dir 2024-09-20 10:04:34 +03:00
dbus.c
defer-call.c util/defer-call: move defer_call() to util/ 2023-10-31 15:41:42 +01:00
drm.c
envlist.c envlist: Remove unused envlist_parse 2024-09-20 10:00:27 +03:00
error-report.c Remove glib compatibility code that is not required anymore 2024-05-14 12:46:39 +02:00
error.c error: Kill @error_warn 2025-10-01 08:33:24 +02:00
event.c qemu-thread: Use futex for QemuEvent on Windows 2025-06-06 14:32:55 +02:00
event_notifier-posix.c treewide: use qemu_set_blocking instead of g_unix_set_fd_nonblocking 2025-09-19 12:46:07 +01:00
event_notifier-win32.c
fdmon-epoll.c aio-posix: integrate fdmon into glib event loop 2025-11-11 22:04:53 +01:00
fdmon-io_uring.c aio-posix: add aio_add_sqe() API for user-defined io_uring requests 2025-11-11 22:06:09 +01:00
fdmon-poll.c aio-posix: integrate fdmon into glib event loop 2025-11-11 22:04:53 +01:00
fifo8.c fifo8: introduce fifo8_peek() function 2024-09-13 20:11:13 +02:00
filemonitor-inotify.c util/filemonitor-inotify.c: spelling fix: kenel 2023-11-15 12:06:05 +03:00
filemonitor-stub.c
getauxval.c util/cpuinfo: Make use of elf_aux_info(3) on OpenBSD 2024-07-30 07:59:23 +10:00
guest-random.c util/guest-random: Clean up global variable shadowing 2023-10-06 13:27:48 +02:00
hbitmap.c qapi/crypto: Rename QCryptoHashAlgorithm to *Algo, and drop prefix 2024-09-10 14:02:16 +02:00
hexdump.c util/hexdump: fix QEMU_HEXDUMP_LINE_WIDTH logic 2025-11-03 11:59:32 +01:00
host-utils.c
id.c
int128.c include/qemu/int128: Use Int128 structure for TCI 2023-02-04 06:19:42 -10:00
interval-tree.c util/interval-tree: Check root for null in interval_tree_iter_first 2023-08-09 09:26:32 -07:00
iov.c util/iov: Do not assert offset is in iov 2025-03-10 17:07:16 +08:00
iova-tree.c vhost-iova-tree, svq: Implement GPA->IOVA & partial IOVA->HVA trees 2025-02-21 07:18:42 -05:00
keyval.c qapi: Move include/qapi/qmp/ to include/qobject/ 2025-02-10 15:33:16 +01:00
lockcnt.c qemu-thread: Use futex if available for QemuLockCnt 2025-06-06 14:32:55 +02:00
log.c Fix const qualifier build errors with recent glibc 2025-12-09 21:00:15 +01:00
main-loop.c timers: properly prefix init_clocks() 2025-11-03 11:59:32 +01:00
memalign.c
memfd.c physmem: fd-based shared memory 2025-01-29 11:43:04 -03:00
meson.build qemu-thread: Use futex for QemuEvent on Windows 2025-06-06 14:32:55 +02:00
mmap-alloc.c util/mmap-alloc: qemu_fd_getfs() 2023-04-24 11:29:00 +02:00
module.c overall: Remove unnecessary g_strdup_printf() calls 2025-02-14 08:49:06 +03:00
notify.c notify: pass error to notifier with return 2024-02-28 11:31:28 +08:00
nvdimm-utils.c
osdep.c migration: Add direct-io parameter 2024-06-21 09:47:22 -03:00
oslib-posix.c oslib: qemu_clear_cloexec 2025-10-03 09:48:02 -04:00
oslib-win32.c oslib: qemu_clear_cloexec 2025-10-03 09:48:02 -04:00
path.c
qdist.c util: spelling fixes 2023-08-31 19:47:43 +02:00
qemu-co-shared-resource.c util/co-shared-resource: Remove unused co_try_get_from_shres 2024-09-30 10:53:18 +03:00
qemu-co-timeout.c
qemu-config.c qapi: Move include/qapi/qmp/ to include/qobject/ 2025-02-10 15:33:16 +01:00
qemu-coroutine-io.c aio: remove aio_disable_external() API 2023-05-30 17:37:26 +02:00
qemu-coroutine-lock.c atomics: eliminate mb_read/mb_set 2023-06-06 09:42:14 +02:00
qemu-coroutine-sleep.c coroutine: Clean up superfluous inclusion of qemu/coroutine.h 2023-01-19 10:18:28 +01:00
qemu-coroutine.c util/coroutine: fix -Werror=maybe-uninitialized false-positive 2024-10-02 16:14:29 +04:00
qemu-option.c qapi: Move include/qapi/qmp/ to include/qobject/ 2025-02-10 15:33:16 +01:00
qemu-print.c
qemu-progress.c
qemu-sockets.c util/qemu-sockets: Introduce inet socket options controlling TCP keep-alive 2025-05-22 11:24:41 +01:00
qemu-thread-common.h bql: Fix bql_locked status with condvar APIs 2025-11-03 11:59:32 +01:00
qemu-thread-posix.c qemu-thread: Use futex for QemuEvent on Windows 2025-06-06 14:32:55 +02:00
qemu-thread-win32.c qemu-thread: Use futex for QemuEvent on Windows 2025-06-06 14:32:55 +02:00
qemu-timer-common.c
qemu-timer.c timers: properly prefix init_clocks() 2025-11-03 11:59:32 +01:00
qht.c cleanup: Drop pointless return at end of function 2025-04-24 09:33:42 +02:00
qsp.c system/cpus: rename qemu_mutex_lock_iothread() to bql_lock() 2024-01-08 10:45:43 -05:00
qtree.c tcg: use QTree instead of GTree 2023-03-28 15:23:10 -07:00
range.c util/range.c: spelling fix: inbetween 2023-11-15 12:06:05 +03:00
rcu.c rcu: Unify force quiescent state 2025-10-28 12:39:59 +01:00
readline.c util/readline: Add C-u shortcut 2024-06-19 12:42:03 +02:00
reserved-region.c util/reserved-region: Add new ReservedRegion helpers 2023-11-03 09:20:31 +01:00
s390x_pci_mmio.c util: Add functions for s390x mmio read/write 2025-05-08 10:03:07 -04:00
selfmap.c util/selfmap: Use dev_t and ino_t in MapInfo 2023-09-01 13:34:03 -07:00
stats64.c stat64: Add stat64_set() operation 2023-04-27 16:39:43 +02:00
sys_membarrier.c
systemd.c systemd: Also clear LISTEN_FDNAMES during systemd socket activation 2023-05-03 14:00:08 -05:00
thread-context.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
thread-pool.c thread-pool: Implement generic (non-AIO) pool support 2025-03-06 06:47:33 +01:00
throttle.c throttle: use THROTTLE_MAX/ARRAY_SIZE for hard code 2023-08-29 10:49:24 +02:00
timed-average.c license: Simplify GPL-2.0-or-later license descriptions 2024-09-20 10:11:59 +03:00
trace-events aio-posix: add aio_add_sqe() API for user-defined io_uring requests 2025-11-11 22:06:09 +01:00
trace.h
transactions.c
unicode.c
userfaultfd.c util/userfaultfd: Remove unused uffd_poll_events 2024-10-08 15:28:55 -04:00
uuid.c util/uuid: Add UUID_STR_LEN definition 2023-11-03 09:20:31 +01:00
vfio-helpers.c include/system: Move exec/memory.h to system/memory.h 2025-04-23 14:08:21 -07:00
vhost-user-server.c util/vhost-user-server: vu_message_read(): improve error handling 2025-09-19 12:46:07 +01:00
yank.c qapi: Fix dangling references to docs/devel/qapi-code-gen.txt 2024-01-26 07:04:53 +01:00