]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
hw/virtio: Add missing "hw/core/cpu.h" include
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 13 Dec 2022 11:17:02 +0000 (12:17 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 21 Dec 2022 12:32:24 +0000 (07:32 -0500)
virtio.c uses target_words_bigendian() which is declared in
"hw/core/cpu.h". Add the missing header to avoid when refactoring:

  hw/virtio/virtio.c:2451:9: error: implicit declaration of function 'target_words_bigendian' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    if (target_words_bigendian()) {
        ^

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20221213111707.34921-2-philmd@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio/virtio.c

index 2118efbe72ac887d02cad85bdc9f7dc178174d3f..15197002ef81a47668491bfe033053d38fb1b8df 100644 (file)
@@ -25,6 +25,7 @@
 #include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "qom/object_interfaces.h"
+#include "hw/core/cpu.h"
 #include "hw/virtio/virtio.h"
 #include "migration/qemu-file-types.h"
 #include "qemu/atomic.h"