]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
hw/mips: Include missing 'exec/tswap.h' header
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Thu, 5 Dec 2024 22:48:36 +0000 (23:48 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Fri, 13 Dec 2024 23:16:20 +0000 (00:16 +0100)
Some files indirectly get "exec/tswap.h" declarations via
"exec/cpu-all.h". Include it directly to be able to remove
the former from the latter, otherwise we get:

  hw/mips/malta.c:674:22: error: call to undeclared function 'tswap32'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    674 |                      tswap32((1 << 31) /* ConfigEn */
        |                      ^
  hw/mips/fuloong2e.c:89:23: error: call to undeclared function 'tswap32'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     89 |     prom_buf[index] = tswap32(ENVP_VADDR + table_addr);
        |                       ^

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

hw/mips/fuloong2e.c
hw/mips/malta.c

index 7fd8296ccb66aab30978e24f5c336d7998b36c81..904c10b90e32ffb23639b0a38ebb29fec3904f50 100644 (file)
@@ -40,6 +40,7 @@
 #include "sysemu/reset.h"
 #include "sysemu/sysemu.h"
 #include "qemu/error-report.h"
+#include "exec/tswap.h"
 
 #define ENVP_PADDR              0x2000
 #define ENVP_VADDR              cpu_mips_phys_to_kseg0(NULL, ENVP_PADDR)
index 198da5ba3d4b0491f219ebe95e7cbec88972fe48..834636dae599f00d8cf3064db30d9a9e5b23d6de 100644 (file)
@@ -28,6 +28,7 @@
 #include "qemu/datadir.h"
 #include "qemu/cutils.h"
 #include "qemu/guest-random.h"
+#include "exec/tswap.h"
 #include "hw/clock.h"
 #include "hw/southbridge/piix.h"
 #include "hw/isa/superio.h"