]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
hw/mips/loongson3_bootp: Include missing headers
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Sun, 12 Jan 2025 20:14:07 +0000 (21:14 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Fri, 31 Jan 2025 18:36:43 +0000 (19:36 +0100)
MemMapEntry is declared in "exec/hwaddr.h", cpu_to_le32() in
"qemu/bswap.h". These headers are indirectly included via "cpu.h".
Include them explicitly in order to avoid when removing "cpu.h":

  In file included from ../../hw/mips/loongson3_bootp.c:27:
  hw/mips/loongson3_bootp.h:234:14: error: unknown type name 'MemMapEntry'
    234 | extern const MemMapEntry virt_memmap[];
        |              ^
  hw/mips/loongson3_bootp.c:33:18: error: call to undeclared function 'cpu_to_le32'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     33 |     c->cputype = cpu_to_le32(Loongson_3A);
        |                  ^

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20250115232952.31166-6-philmd@linaro.org>

hw/mips/loongson3_bootp.c

index b97b81903b7415013581cf731e85ad72401658b5..712439c2575c01556615d95e80f6f587491a35f2 100644 (file)
@@ -21,6 +21,8 @@
 #include "qemu/osdep.h"
 #include "qemu/units.h"
 #include "qemu/cutils.h"
+#include "qemu/bswap.h"
+#include "exec/hwaddr.h"
 #include "cpu.h"
 #include "hw/boards.h"
 #include "hw/mips/loongson3_bootp.h"