Message ID | 20200507173958.25894-3-philmd@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | exec: Shear 'exec/ram_addr.h' and make NVMe device target-agnostic | expand |
Philippe Mathieu-Daudé <philmd@redhat.com> wrote: > The first field of RAMBlock is a rcu_head structure. > We need to include the "qemu/rcu.h" to avoid errors when > including "exec/ramblock.h" without "qemu/rcu.h": > > include/exec/ramblock.h:27:21: error: field ‘rcu’ has incomplete type > 27 | struct rcu_head rcu; > | ^~~ > include/exec/ramblock.h:39:5: error: expected > specifier-qualifier-list before ‘QLIST_ENTRY’ > 39 | QLIST_ENTRY(RAMBlock) next; > | ^~~~~~~~~~~ > > Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com>
diff --git a/include/exec/ramblock.h b/include/exec/ramblock.h index 07d50864d8..6ac0aa7a89 100644 --- a/include/exec/ramblock.h +++ b/include/exec/ramblock.h @@ -21,6 +21,7 @@ #ifndef CONFIG_USER_ONLY #include "cpu-common.h" +#include "qemu/rcu.h" struct RAMBlock { struct rcu_head rcu;
The first field of RAMBlock is a rcu_head structure. We need to include the "qemu/rcu.h" to avoid errors when including "exec/ramblock.h" without "qemu/rcu.h": include/exec/ramblock.h:27:21: error: field ‘rcu’ has incomplete type 27 | struct rcu_head rcu; | ^~~ include/exec/ramblock.h:39:5: error: expected specifier-qualifier-list before ‘QLIST_ENTRY’ 39 | QLIST_ENTRY(RAMBlock) next; | ^~~~~~~~~~~ Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> --- include/exec/ramblock.h | 1 + 1 file changed, 1 insertion(+)