"system/memory.h" header is indirectly pulled by "hw/sysbus.h".
Include it explicitly to avoid when refactoring the latter:
hw/block/pflash_cfi01.c:83:18: error: field has incomplete type
'MemoryRegion' (aka 'struct MemoryRegion')
83 | MemoryRegion mem;
| ^
hw/block/pflash_cfi02.c:100:18: error: field has incomplete type
'MemoryRegion' (aka 'struct MemoryRegion')
100 | MemoryRegion mem;
| ^
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]>
---
hw/block/pflash_cfi01.c | 1 +
hw/block/pflash_cfi02.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c
index 168101d8dfe..04c30d17a99 100644
--- a/hw/block/pflash_cfi01.c
+++ b/hw/block/pflash_cfi01.c
@@ -51,6 +51,7 @@
#include "hw/sysbus.h"
#include "migration/vmstate.h"
#include "system/blockdev.h"
+#include "system/memory.h"
#include "system/runstate.h"
#include "trace.h"
diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c
index 3244b699b98..a2106a7ed9b 100644
--- a/hw/block/pflash_cfi02.c
+++ b/hw/block/pflash_cfi02.c
@@ -42,6 +42,7 @@
#include "qemu/bitmap.h"
#include "qemu/timer.h"
#include "system/block-backend.h"
+#include "system/memory.h"
#include "qemu/host-utils.h"
#include "qemu/module.h"
#include "hw/sysbus.h"
--
2.51.0