Message ID | 1527266793-301361-5-git-send-email-mst@redhat.com |
---|---|
State | New |
Headers | show |
Series | include cleanups | expand |
On 05/25/2018 11:47 AM, Michael S. Tsirkin wrote: > we just need a struct name, let's add a forward > declaration instead of an include. > > Signed-off-by: Michael S. Tsirkin <mst@redhat.com> > --- > include/migration/vmstate.h | 2 +- > migration/savevm.c | 1 + > 2 files changed, 2 insertions(+), 1 deletion(-) I'm okay with the patch as-is, but the commit message could possibly be improved: In the vmstate.h file, we just need a struct name. Use a forward declaration instead of an include, then adjust the one affected .c file to include the file that is no longer implicit from the header. Reviewed-by: Eric Blake <eblake@redhat.com>
diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index df463fd..5877cae 100644 --- a/include/migration/vmstate.h +++ b/include/migration/vmstate.h @@ -27,7 +27,7 @@ #ifndef QEMU_VMSTATE_H #define QEMU_VMSTATE_H -#include "migration/qjson.h" +typedef struct QJSON QJSON; typedef struct VMStateInfo VMStateInfo; typedef struct VMStateDescription VMStateDescription; diff --git a/migration/savevm.c b/migration/savevm.c index 4251125..da724c5 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -55,6 +55,7 @@ #include "io/channel-buffer.h" #include "io/channel-file.h" #include "sysemu/replay.h" +#include "qjson.h" #ifndef ETH_P_RARP #define ETH_P_RARP 0x8035
we just need a struct name, let's add a forward declaration instead of an include. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> --- include/migration/vmstate.h | 2 +- migration/savevm.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)