Various header files rely on qemu-char.h including qemu-config.h or main-loop.h, but they really do not need qemu-char.h at all (particularly interesting is the case of the block layer!). Clean this up, and also complete the set of inclusions of qemu-config.h itself.
Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> --- arch_init.c | 1 + audio/alsaaudio.c | 1 + audio/ossaudio.c | 1 + block/blkdebug.c | 1 + block/iscsi.c | 1 + bt-host.c | 1 + bt-vhci.c | 1 + event_notifier.c | 1 + exec.c | 1 + hw/arm_boot.c | 1 + hw/dma.c | 1 + hw/fw_cfg.c | 1 + hw/mac_dbdma.c | 1 + hw/qdev-monitor.c | 1 + hw/usb/dev-network.c | 1 + linux-aio.c | 1 + net.c | 1 + qemu-aio.h | 1 + qemu-config.h | 1 + target-i386/kvm.c | 1 + 20 files changed, 20 insertions(+), 0 deletions(-) diff --git a/arch_init.c b/arch_init.c index e6effe8..dde7fad 100644 --- a/arch_init.c +++ b/arch_init.c @@ -46,6 +46,7 @@ #include "exec-memory.h" #include "hw/pcspk.h" #include "qemu/page_cache.h" +#include "qemu-config.h" #include "qmp-commands.h" #include "trace.h" diff --git a/audio/alsaaudio.c b/audio/alsaaudio.c index cb45b49..564d632 100644 --- a/audio/alsaaudio.c +++ b/audio/alsaaudio.c @@ -23,6 +23,7 @@ */ #include <alsa/asoundlib.h> #include "qemu-common.h" +#include "main-loop.h" #include "qemu-char.h" #include "audio.h" diff --git a/audio/ossaudio.c b/audio/ossaudio.c index df51b7c..45abe39 100644 --- a/audio/ossaudio.c +++ b/audio/ossaudio.c @@ -31,6 +31,7 @@ #include <sys/soundcard.h> #endif #include "qemu-common.h" +#include "main-loop.h" #include "host-utils.h" #include "qemu-char.h" #include "audio.h" diff --git a/block/blkdebug.c b/block/blkdebug.c index 1206d52..152c0a8 100644 --- a/block/blkdebug.c +++ b/block/blkdebug.c @@ -23,6 +23,7 @@ */ #include "qemu-common.h" +#include "qemu-config.h" #include "block_int.h" #include "module.h" diff --git a/block/iscsi.c b/block/iscsi.c index d0b1a10..9f182ac 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -27,6 +27,7 @@ #include <poll.h> #include <arpa/inet.h> #include "qemu-common.h" +#include "qemu-config.h" #include "qemu-error.h" #include "block_int.h" #include "trace.h" diff --git a/bt-host.c b/bt-host.c index 0d3ad28..8b47370 100644 --- a/bt-host.c +++ b/bt-host.c @@ -21,6 +21,7 @@ #include "qemu-char.h" #include "net.h" #include "bt-host.h" +#include "main-loop.h" #ifndef _WIN32 # include <errno.h> diff --git a/bt-vhci.c b/bt-vhci.c index bbc1029..878460a 100644 --- a/bt-vhci.c +++ b/bt-vhci.c @@ -21,6 +21,7 @@ #include "qemu-char.h" #include "net.h" #include "hw/bt.h" +#include "main-loop.h" #define VHCI_DEV "/dev/vhci" #define VHCI_UDEV "/dev/hci_vhci" diff --git a/event_notifier.c b/event_notifier.c index 2c207e1..23d5128 100644 --- a/event_notifier.c +++ b/event_notifier.c @@ -13,6 +13,7 @@ #include "qemu-common.h" #include "event_notifier.h" #include "qemu-char.h" +#include "main-loop.h" #ifdef CONFIG_EVENTFD #include <sys/eventfd.h> diff --git a/exec.c b/exec.c index 750008c..1821aef 100644 --- a/exec.c +++ b/exec.c @@ -33,6 +33,7 @@ #include "kvm.h" #include "hw/xen.h" #include "qemu-timer.h" +#include "qemu-config.h" #include "memory.h" #include "exec-memory.h" #if defined(CONFIG_USER_ONLY) diff --git a/hw/arm_boot.c b/hw/arm_boot.c index a6e9143..740ecfb 100644 --- a/hw/arm_boot.c +++ b/hw/arm_boot.c @@ -15,6 +15,7 @@ #include "loader.h" #include "elf.h" #include "device_tree.h" +#include "qemu-config.h" #define KERNEL_ARGS_ADDR 0x100 #define KERNEL_LOAD_ADDR 0x00010000 diff --git a/hw/dma.c b/hw/dma.c index 0a9322d..8053ded 100644 --- a/hw/dma.c +++ b/hw/dma.c @@ -23,6 +23,7 @@ */ #include "hw.h" #include "isa.h" +#include "main-loop.h" /* #define DEBUG_DMA */ diff --git a/hw/fw_cfg.c b/hw/fw_cfg.c index dcde1a9..2e54a43 100644 --- a/hw/fw_cfg.c +++ b/hw/fw_cfg.c @@ -27,6 +27,7 @@ #include "fw_cfg.h" #include "sysbus.h" #include "qemu-error.h" +#include "qemu-config.h" /* debug firmware config */ //#define DEBUG_FW_CFG diff --git a/hw/mac_dbdma.c b/hw/mac_dbdma.c index 1791ec1..ac98fe9 100644 --- a/hw/mac_dbdma.c +++ b/hw/mac_dbdma.c @@ -39,6 +39,7 @@ #include "hw.h" #include "isa.h" #include "mac_dbdma.h" +#include "main-loop.h" /* debug DBDMA */ //#define DEBUG_DBDMA diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c index 479eecd..6e5eb45 100644 --- a/hw/qdev-monitor.c +++ b/hw/qdev-monitor.c @@ -21,6 +21,7 @@ #include "monitor.h" #include "qmp-commands.h" #include "arch_init.h" +#include "qemu-config.h" /* * Aliases were a bad idea from the start. Let's keep them diff --git a/hw/usb/dev-network.c b/hw/usb/dev-network.c index e4a4359..df8a3bb 100644 --- a/hw/usb/dev-network.c +++ b/hw/usb/dev-network.c @@ -28,6 +28,7 @@ #include "hw/usb/desc.h" #include "net.h" #include "qemu-queue.h" +#include "qemu-config.h" #include "sysemu.h" #include "iov.h" diff --git a/linux-aio.c b/linux-aio.c index ce9b5d4..f3d8ef3 100644 --- a/linux-aio.c +++ b/linux-aio.c @@ -9,6 +9,7 @@ */ #include "qemu-common.h" #include "qemu-aio.h" +#include "qemu-queue.h" #include "block/raw-posix-aio.h" #include <sys/eventfd.h> diff --git a/net.c b/net.c index ae4bc0d..72d1c33 100644 --- a/net.c +++ b/net.c @@ -32,6 +32,7 @@ #include "monitor.h" #include "qemu-common.h" #include "qemu_socket.h" +#include "qemu-config.h" #include "qmp-commands.h" #include "hw/qdev.h" #include "iov.h" diff --git a/qemu-aio.h b/qemu-aio.h index bfdd35f..a61cd83 100644 --- a/qemu-aio.h +++ b/qemu-aio.h @@ -16,6 +16,7 @@ #include "qemu-common.h" #include "qemu-char.h" +#include "main-loop.h" typedef struct BlockDriverAIOCB BlockDriverAIOCB; typedef void BlockDriverCompletionFunc(void *opaque, int ret); diff --git a/qemu-config.h b/qemu-config.h index 5557562..daf1539 100644 --- a/qemu-config.h +++ b/qemu-config.h @@ -2,6 +2,7 @@ #define QEMU_CONFIG_H #include "error.h" +#include "qemu-option.h" extern QemuOptsList qemu_fsdev_opts; extern QemuOptsList qemu_virtfs_opts; diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 5b18383..c918276 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -27,6 +27,7 @@ #include "cpu.h" #include "gdbstub.h" #include "host-utils.h" +#include "qemu-config.h" #include "hw/pc.h" #include "hw/apic.h" #include "ioport.h" -- 1.7.1