mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
ppc: Fix duplicated typedefs to be able to compile with Clang in gnu99 mode
When compiling the ppc code with clang and -std=gnu99, there are a couple of warnings/errors like this one: CC ppc64-softmmu/hw/intc/xics.o In file included from hw/intc/xics.c:35: include/hw/ppc/xics.h:43:25: error: redefinition of typedef 'ICPState' is a C11 feature [-Werror,-Wtypedef-redefinition] typedef struct ICPState ICPState; ^ target/ppc/cpu.h:1181:25: note: previous definition is here typedef struct ICPState ICPState; ^ Work around the problems by including the proper headers in spapr.h and by using struct forward declarations in cpu.h. Reviewed-by: Greg Kurz <groug@kaod.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
a51d5afc69
commit
0d8d6a24fc
3 changed files with 8 additions and 8 deletions
|
@ -8,15 +8,16 @@
|
|||
#include "hw/mem/pc-dimm.h"
|
||||
#include "hw/ppc/spapr_ovec.h"
|
||||
#include "hw/ppc/spapr_irq.h"
|
||||
#include "hw/ppc/spapr_xive.h" /* For sPAPRXive */
|
||||
#include "hw/ppc/xics.h" /* For ICSState */
|
||||
|
||||
struct VIOsPAPRBus;
|
||||
struct sPAPRPHBState;
|
||||
struct sPAPRNVRAM;
|
||||
|
||||
typedef struct sPAPREventLogEntry sPAPREventLogEntry;
|
||||
typedef struct sPAPREventSource sPAPREventSource;
|
||||
typedef struct sPAPRPendingHPT sPAPRPendingHPT;
|
||||
typedef struct ICSState ICSState;
|
||||
typedef struct sPAPRXive sPAPRXive;
|
||||
|
||||
#define HPTE64_V_HPTE_DIRTY 0x0000000000000040ULL
|
||||
#define SPAPR_ENTRY_POINT 0x100
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue