diff mbox series

hw/ppc/spapr: Include missing 'sysemu/tcg.h' header

Message ID 20240322162459.7173-1-philmd@linaro.org
State Accepted
Commit beb0b62c3e0f7e486eac680f41b140f4ed492f59
Headers show
Series hw/ppc/spapr: Include missing 'sysemu/tcg.h' header | expand

Commit Message

Philippe Mathieu-Daudé March 22, 2024, 4:24 p.m. UTC
"sysemu/tcg.h" declares tcg_enabled(), and is implicitly included.
Include it explicitly to avoid the following error when refactoring
headers:

  hw/ppc/spapr.c:2612:9: error: call to undeclared function 'tcg_enabled'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    if (tcg_enabled()) {
        ^

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/ppc/spapr.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Harsh Prateek Bora March 26, 2024, 4:57 a.m. UTC | #1
On 3/22/24 21:54, Philippe Mathieu-Daudé wrote:
> "sysemu/tcg.h" declares tcg_enabled(), and is implicitly included.
> Include it explicitly to avoid the following error when refactoring
> headers:
> 
>    hw/ppc/spapr.c:2612:9: error: call to undeclared function 'tcg_enabled'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
>      if (tcg_enabled()) {
>          ^
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>

Reviewed-by: Harsh Prateek Bora <harshpb@linux.ibm.com>

> ---
>   hw/ppc/spapr.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index c417f9dd52..e9bc97fee0 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -35,6 +35,7 @@
>   #include "sysemu/sysemu.h"
>   #include "sysemu/hostmem.h"
>   #include "sysemu/numa.h"
> +#include "sysemu/tcg.h"
>   #include "sysemu/qtest.h"
>   #include "sysemu/reset.h"
>   #include "sysemu/runstate.h"
diff mbox series

Patch

diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index c417f9dd52..e9bc97fee0 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -35,6 +35,7 @@ 
 #include "sysemu/sysemu.h"
 #include "sysemu/hostmem.h"
 #include "sysemu/numa.h"
+#include "sysemu/tcg.h"
 #include "sysemu/qtest.h"
 #include "sysemu/reset.h"
 #include "sysemu/runstate.h"