"system/memory.h" header is indirectly pulled by "hw/sysbus.h".
Include it explicitly to avoid when refactoring the latter:

  In file included from ../../hw/core/platform-bus.c:23:
  include/hw/platform-bus.h:38:18: error: field has incomplete type 
'MemoryRegion' (aka 'struct MemoryRegion')
     38 |     MemoryRegion mmio;
        |                  ^
  include/qemu/typedefs.h:68:16: note: forward declaration of 'struct 
MemoryRegion'
     68 | typedef struct MemoryRegion MemoryRegion;
        |                ^

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
---
 include/hw/platform-bus.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/hw/platform-bus.h b/include/hw/platform-bus.h
index 44f30c5353f..8672ccc45ec 100644
--- a/include/hw/platform-bus.h
+++ b/include/hw/platform-bus.h
@@ -24,6 +24,7 @@
 
 #include "hw/sysbus.h"
 #include "qom/object.h"
+#include "system/memory.h"
 
 
 #define TYPE_PLATFORM_BUS_DEVICE "platform-bus-device"
-- 
2.51.0


Reply via email to