On Fri, Jan 11, 2019 at 09:17:50AM +0100, Thomas Huth wrote:
> When compiling with Clang in -std=gnu99 mode, there is a warning/error:
> 
>   CC      ppc64-softmmu/hw/intc/xics_spapr.o
> In file included from /home/thuth/devel/qemu/hw/intc/xics_spapr.c:34:
> /home/thuth/devel/qemu/include/hw/ppc/xics.h:203:34: error: redefinition of 
> typedef 'sPAPRMachineState' is a C11 feature
>       [-Werror,-Wtypedef-redefinition]
> typedef struct sPAPRMachineState sPAPRMachineState;
>                                  ^
> /home/thuth/devel/qemu/include/hw/ppc/spapr_irq.h:25:34: note: previous 
> definition is here
> typedef struct sPAPRMachineState sPAPRMachineState;
>                                  ^
> 
> We have to remove the duplicated typedef here and include "spapr.h" instead.
> But "spapr.h" should not be included for the pnv machine files. So move
> the spapr-related prototypes into a new file called "xics_spapr.h" instead.
> 
> Reviewed-by: Greg Kurz <gr...@kaod.org>
> Reviewed-by: Cédric Le Goater <c...@kaod.org>
> Signed-off-by: Thomas Huth <th...@redhat.com>
> ---
>  hw/intc/xics_kvm.c          |  1 +
>  hw/intc/xics_spapr.c        |  1 +
>  hw/ppc/spapr_irq.c          |  1 +
>  include/hw/ppc/xics.h       |  7 -------
>  include/hw/ppc/xics_spapr.h | 37 +++++++++++++++++++++++++++++++++++++
>  5 files changed, 40 insertions(+), 7 deletions(-)
>  create mode 100644 include/hw/ppc/xics_spapr.h

Reviewed-by: Daniel P. Berrangé <berra...@redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

Reply via email to