"exec/cpu-common.h" and "system/memory.h" headers are indirectly
pulled by "hw/sysbus.h". Include them explicitly to avoid when
refactoring the latter:
hw/rtc/sun4v-rtc.c:28:18: error: field has incomplete type 'MemoryRegion'
(aka 'struct MemoryRegion')
28 | MemoryRegion iomem;
| ^
hw/rtc/sun4v-rtc.c:52:19: error: use of undeclared identifier
'DEVICE_NATIVE_ENDIAN'
52 | .endianness = DEVICE_NATIVE_ENDIAN,
| ^
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
---
hw/rtc/sun4v-rtc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/rtc/sun4v-rtc.c b/hw/rtc/sun4v-rtc.c
index 29e24ef6bed..c0859b270d3 100644
--- a/hw/rtc/sun4v-rtc.c
+++ b/hw/rtc/sun4v-rtc.c
@@ -17,6 +17,8 @@
#include "hw/rtc/sun4v-rtc.h"
#include "trace.h"
#include "qom/object.h"
+#include "exec/cpu-common.h"
+#include "system/memory.h"
#define TYPE_SUN4V_RTC "sun4v_rtc"
--
2.51.0