"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/rtc/m48t59.c:41:
  ../../hw/rtc/m48t59-internal.h:44:18: error: field has incomplete type 
'MemoryRegion' (aka 'struct MemoryRegion')
     44 |     MemoryRegion iomem;
        |                  ^

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
---
 hw/rtc/m48t59-internal.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/rtc/m48t59-internal.h b/hw/rtc/m48t59-internal.h
index cd648241e98..791c15b7184 100644
--- a/hw/rtc/m48t59-internal.h
+++ b/hw/rtc/m48t59-internal.h
@@ -26,6 +26,8 @@
 #ifndef HW_M48T59_INTERNAL_H
 #define HW_M48T59_INTERNAL_H
 
+#include "system/memory.h"
+
 /*
  * The M48T02, M48T08 and M48T59 chips are very similar. The newer '59 has
  * alarm and a watchdog timer and related control registers. In the
-- 
2.51.0


Reply via email to