This allows to use a forward declaration instead of including system/memory_mapping.h.
Reviewed-by: Marc-André Lureau <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Signed-off-by: Pierrick Bouvier <[email protected]> --- include/qemu/typedefs.h | 1 + include/system/memory_mapping.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h index 8fa7f752dac..488d2556670 100644 --- a/include/qemu/typedefs.h +++ b/include/qemu/typedefs.h @@ -53,6 +53,7 @@ typedef struct Error Error; typedef struct EventNotifier EventNotifier; typedef struct FlatView FlatView; typedef struct FWCfgState FWCfgState; +typedef struct GuestPhysBlockList GuestPhysBlockList; typedef struct HostMemoryBackend HostMemoryBackend; typedef struct I2CBus I2CBus; typedef struct I2SCodec I2SCodec; diff --git a/include/system/memory_mapping.h b/include/system/memory_mapping.h index 4c770bf0b83..3bdf9badb5c 100644 --- a/include/system/memory_mapping.h +++ b/include/system/memory_mapping.h @@ -36,10 +36,10 @@ typedef struct GuestPhysBlock { } GuestPhysBlock; /* point-in-time snapshot of guest-visible physical mappings */ -typedef struct GuestPhysBlockList { +struct GuestPhysBlockList { unsigned num; QTAILQ_HEAD(, GuestPhysBlock) head; -} GuestPhysBlockList; +}; /* The physical and virtual address in the memory mapping are contiguous. */ typedef struct MemoryMapping { -- 2.47.3
