"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/sparc/sun4m_iommu.c:28:
include/hw/sparc/sun4m_iommu.h:36:18: error: field has incomplete type
'AddressSpace' (aka 'struct AddressSpace')
36 | AddressSpace iommu_as;
| ^
In file included from ../../hw/sparc64/sun4u_iommu.c:29:
include/hw/sparc/sun4u_iommu.h:38:18: error: field has incomplete type
'AddressSpace' (aka 'struct AddressSpace')
38 | AddressSpace iommu_as;
| ^
include/qemu/typedefs.h:27:16: note: forward declaration of 'struct
AddressSpace'
27 | typedef struct AddressSpace AddressSpace;
| ^
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
---
include/hw/sparc/sparc32_dma.h | 1 +
include/hw/sparc/sun4m_iommu.h | 1 +
include/hw/sparc/sun4u_iommu.h | 1 +
3 files changed, 3 insertions(+)
diff --git a/include/hw/sparc/sparc32_dma.h b/include/hw/sparc/sparc32_dma.h
index cde8ec02cb6..46ed0a20d88 100644
--- a/include/hw/sparc/sparc32_dma.h
+++ b/include/hw/sparc/sparc32_dma.h
@@ -5,6 +5,7 @@
#include "hw/scsi/esp.h"
#include "hw/net/lance.h"
#include "qom/object.h"
+#include "system/memory.h"
#define DMA_REGS 4
diff --git a/include/hw/sparc/sun4m_iommu.h b/include/hw/sparc/sun4m_iommu.h
index 4e2ab34cdef..dd09a72c525 100644
--- a/include/hw/sparc/sun4m_iommu.h
+++ b/include/hw/sparc/sun4m_iommu.h
@@ -27,6 +27,7 @@
#include "hw/sysbus.h"
#include "qom/object.h"
+#include "system/memory.h"
#define IOMMU_NREGS (4 * 4096 / 4)
diff --git a/include/hw/sparc/sun4u_iommu.h b/include/hw/sparc/sun4u_iommu.h
index f94566a72c9..fad71264408 100644
--- a/include/hw/sparc/sun4u_iommu.h
+++ b/include/hw/sparc/sun4u_iommu.h
@@ -29,6 +29,7 @@
#include "hw/sysbus.h"
#include "qom/object.h"
+#include "system/memory.h"
#define IOMMU_NREGS 3
--
2.51.0