aspeed/timer: fix compile breakage with clang 3.4.2
authorCédric Le Goater <clg@kaod.org>
Tue, 25 Sep 2018 13:02:33 +0000 (14:02 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 25 Sep 2018 14:13:24 +0000 (15:13 +0100)
In file included from /home/thuth/devel/qemu/hw/timer/aspeed_timer.c:16:
/home/thuth/devel/qemu/include/hw/misc/aspeed_scu.h:37:3: error:
redefinition of typedef 'AspeedSCUState' is a C11 feature
      [-Werror,-Wtypedef-redefinition]
} AspeedSCUState;
  ^
/home/thuth/devel/qemu/include/hw/timer/aspeed_timer.h:27:31: note:
previous definition is here
typedef struct AspeedSCUState AspeedSCUState;

Reported-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180921161939.822-2-clg@kaod.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/timer/aspeed_timer.c
include/hw/timer/aspeed_timer.h

index 5e3f51b66b430df068f81dec89f1fe2fecceeb32..54b400b94aa9e1f2b06e2c1a71767824f698c8bf 100644 (file)
@@ -13,7 +13,6 @@
 #include "qapi/error.h"
 #include "hw/sysbus.h"
 #include "hw/timer/aspeed_timer.h"
-#include "hw/misc/aspeed_scu.h"
 #include "qemu-common.h"
 #include "qemu/bitops.h"
 #include "qemu/timer.h"
index 040a088734322133de2c91f3942a1d23b0ebc647..1fb949e1671081957e49847ca7a8b0a806cd0d1a 100644 (file)
@@ -23,8 +23,7 @@
 #define ASPEED_TIMER_H
 
 #include "qemu/timer.h"
-
-typedef struct AspeedSCUState AspeedSCUState;
+#include "hw/misc/aspeed_scu.h"
 
 #define ASPEED_TIMER(obj) \
     OBJECT_CHECK(AspeedTimerCtrlState, (obj), TYPE_ASPEED_TIMER);