sysemu/tcg: Only declare tcg_allowed when TCG is available
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Tue, 26 May 2020 17:24:22 +0000 (19:24 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 12 Jun 2020 15:12:44 +0000 (11:12 -0400)
When TCG is not available, the tcg_allowed variable does not exist.

Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20200526172427.17460-3-f4bug@amsat.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
include/sysemu/tcg.h

index 7d116d2e801a1c30d909adfe3aa4c03d68752dfe..d9d3ca85596f9aa93ae8470a931b8d0f76aa0a8a 100644 (file)
@@ -8,9 +8,9 @@
 #ifndef SYSEMU_TCG_H
 #define SYSEMU_TCG_H
 
-extern bool tcg_allowed;
 void tcg_exec_init(unsigned long tb_size);
 #ifdef CONFIG_TCG
+extern bool tcg_allowed;
 #define tcg_enabled() (tcg_allowed)
 #else
 #define tcg_enabled() 0