Re: [PATCH v2 10/16] monitor: Remove unnecessary 'block/block.h' header
Philippe Mathieu-Daudé <[email protected]>
| Newsgroups | org.nongnu.qemu-devel |
|---|---|
| Message-ID | <[email protected]> |
On 2026-08-12 16:00, Marc-André Lureau wrote: > Hi > > On Wed, Aug 12, 2026 at 5:38 PM Philippe Mathieu-Daudé > <[email protected]> wrote: >> >> Nothing here requires declarations from "block/block.h". >> >> Signed-off-by: Philippe Mathieu-Daudé <[email protected]> > > breaks for me: > [38/286] Compiling C object libsystem.a.p/net_vhost-vdpa.c.o > FAILED: [code=1] libsystem.a.p/net_vhost-vdpa.c.o > cc -m64 -Ilibsystem.a.p -I. -I.. -Isubprojects/libvduse > -I../subprojects/libvduse -Iui -Iqapi -Itrace -Iui/shader > -I/usr/include/p11-kit-1 -I/usr/include/libpng16 > -I/usr/include/pixman-1 -I/usr/include/spice-1 -I/usr/include/glib-2.0 > -I/usr/lib64/glib-2.0/include -I/usr/include/libmount > -I/usr/include/blkid -I/usr/include/sysprof-6 > -I/usr/include/gio-unix-2.0 -I/usr/include/spice-server > -I/usr/include/opus -I/usr/include/cacard -I/usr/include/nss3 > -I/usr/include/nspr4 -I/usr/include/PCSC -I/usr/include/gstreamer-1.0 > -I/usr/include/libdrm -I/usr/include/orc-0.4 -I/usr/include/slirp > -I/usr/local/include -I/usr/include/libusb-1.0 -I/usr/include/SDL2 > -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 > -I/usr/include/cloudproviders -I/usr/include/cairo > -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glycin-2 > -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 > -I/usr/include/atk-1.0 -I/usr/lib64/pkgconfig/../../include/dbus-1.0 > -I/usr/lib64/pkgconfig/../../lib64/dbus-1.0/include > -I/usr/include/fribidi -I/usr/include/libxml2 -I/usr/include/harfbuzz > -I/usr/include/freetype2 -I/usr/include/vte-2.91 -I/usr/include/rav1e > -I/usr/include/svt-av1 -I/usr/include/libvmaf -I/usr/include/webp > -I/usr/include/virgl -I/usr/include/fuse3 -I/usr/include/pipewire-0.3 > -I/usr/include/spa-0.2 -fdiagnostics-color=auto -Wall -Winvalid-pch > -Werror -std=gnu11 -O2 -g -mcx16 -msse2 -fno-link-libatomic > -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE > -fno-strict-aliasing -fno-common -fwrapv -ftrivial-auto-var-init=zero > -fzero-init-padding-bits=all -fzero-call-used-regs=used-gpr > -fsanitize=address -fstack-protector-strong -fno-omit-frame-pointer > -Wempty-body -Wendif-labels -Wexpansion-to-defined -Wformat-overflow=2 > -Wformat-security -Wformat-y2k -Wignored-qualifiers > -Wimplicit-fallthrough=2 -Winit-self -Wmissing-format-attribute > -Wmissing-prototypes -Wnested-externs -Wold-style-declaration > -Wold-style-definition -Wredundant-decls -Wshadow=local > -Wstrict-prototypes -Wtype-limits -Wundef -Wvla -Wwrite-strings > -Wno-missing-include-dirs -Wno-psabi -Wno-shift-negative-value > -isystem /home/elmarco/src/qemu.nmi/linux-headers -isystem > linux-headers -iquote . -iquote /home/elmarco/src/qemu.nmi -iquote > /home/elmarco/src/qemu.nmi/include -iquote > /home/elmarco/src/qemu.nmi/host/include/x86_64 -iquote > /home/elmarco/src/qemu.nmi/host/include/generic -iquote > /home/elmarco/src/qemu.nmi/tcg/x86_64 -pthread -fPIE > -fno-strict-aliasing -fno-strict-overflow -DHWY_SHARED_DEFINE > -DAVIF_DLL -DEB_DLL -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 > -DNCURSES_WIDECHAR=1 -D_GNU_SOURCE=1 -D_REENTRANT > -DSTRUCT_IOVEC_DEFINED -DWITH_GZFILEOP -DCONFIG_SOFTMMU > -DCOMPILING_SYSTEM_VS_USER -MD -MQ libsystem.a.p/net_vhost-vdpa.c.o > -MF libsystem.a.p/net_vhost-vdpa.c.o.d -o > libsystem.a.p/net_vhost-vdpa.c.o -c ../net/vhost-vdpa.c > ../net/vhost-vdpa.c: In function ‘vhost_vdpa_net_load_cmd’: > ../net/vhost-vdpa.c:714:24: error: implicit declaration of function > ‘iov_size’ [-Wimplicit-function-declaration] > 714 | size_t data_size = iov_size(data_sg, data_num), cmd_size; > | ^~~~~~~~ > ../net/vhost-vdpa.c:714:24: error: nested extern declaration of > ‘iov_size’ [-Werror=nested-externs] > ../net/vhost-vdpa.c:742:5: error: implicit declaration of function > ‘iov_from_buf’ [-Wimplicit-function-declaration] > 742 | iov_from_buf(out_cursor, 1, 0, &ctrl, sizeof(ctrl)); > | ^~~~~~~~~~~~ > ../net/vhost-vdpa.c:742:5: error: nested extern declaration of > ‘iov_from_buf’ [-Werror=nested-externs] > ../net/vhost-vdpa.c:744:5: error: implicit declaration of function > ‘iov_to_buf’ [-Wimplicit-function-declaration] > 744 | iov_to_buf(data_sg, data_num, 0, > | ^~~~~~~~~~ > ../net/vhost-vdpa.c:744:5: error: nested extern declaration of > ‘iov_to_buf’ [-Werror=nested-externs] > ../net/vhost-vdpa.c:748:5: error: implicit declaration of function > ‘iov_copy’; did you mean ‘error_copy’? > [-Wimplicit-function-declaration] > 748 | iov_copy(&out, 1, out_cursor, 1, 0, cmd_size); > | ^~~~~~~~ > | error_copy > ../net/vhost-vdpa.c:748:5: error: nested extern declaration of > ‘iov_copy’ [-Werror=nested-externs] > ../net/vhost-vdpa.c:760:5: error: implicit declaration of function > ‘iov_discard_front’ [-Wimplicit-function-declaration] > 760 | iov_discard_front(&out_cursor, &dummy_cursor_iov_cnt, cmd_size); > | ^~~~~~~~~~~~~~~~~ > ../net/vhost-vdpa.c:760:5: error: nested extern declaration of > ‘iov_discard_front’ [-Werror=nested-externs] > cc1: all warnings being treated as errors > [55/286] Compiling C object libsystem.a.p/system_physmem.c.o > ninja: build stopped: subcommand failed. TIL monitor_fd_param(). Anyway thanks, consider the following as "PATCH 9.5/16": -- >8 -- Author: Philippe Mathieu-Daudé <[email protected]> Date: Wed Aug 12 18:03:10 2026 +0200 net/vhost-vdpa: Include missing 'qemu/iov.h' header vhost-vdpa.c uses methods declared in the "qemu/iov." header. Include it otherwise we get when refactoring unrelated headers: ../net/vhost-vdpa.c: In function ‘vhost_vdpa_net_load_cmd’: ../net/vhost-vdpa.c:714:24: error: implicit declaration of function ‘iov_size’ 714 | size_t data_size = iov_size(data_sg, data_num), cmd_size; | ^~~~~~~~ ../net/vhost-vdpa.c:714:24: error: nested extern declaration of ‘iov_size’ ../net/vhost-vdpa.c:742:5: error: implicit declaration of function ‘iov_from_buf’ 742 | iov_from_buf(out_cursor, 1, 0, &ctrl, sizeof(ctrl)); | ^~~~~~~~~~~~ ../net/vhost-vdpa.c:742:5: error: nested extern declaration of ‘iov_from_buf’ ../net/vhost-vdpa.c:744:5: error: implicit declaration of function ‘iov_to_buf’ 744 | iov_to_buf(data_sg, data_num, 0, | ^~~~~~~~~~ ../net/vhost-vdpa.c:744:5: error: nested extern declaration of ‘iov_to_buf’ ../net/vhost-vdpa.c:748:5: error: implicit declaration of function ‘iov_copy’ 748 | iov_copy(&out, 1, out_cursor, 1, 0, cmd_size); | ^~~~~~~~ Signed-off-by: Philippe Mathieu-Daudé <[email protected]> diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index c526c2b2dc..1052361a4a 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c @@ -17,6 +17,7 @@ #include "hw/virtio/vhost-vdpa.h" #include "qemu/config-file.h" #include "qemu/error-report.h" +#include "qemu/iov.h" #include "qemu/log.h" #include "qemu/memalign.h" #include "qemu/option.h" ---