From: Philippe Mathieu-Daudé Date: Thu, 22 Apr 2021 06:41:28 +0000 (+0200) Subject: exec/gen-icount.h: Add missing "exec/exec-all.h" include X-Git-Tag: v6.1.0-rc0~118^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=91150447be25a12b59c8168996471af33ab10277;p=thirdparty%2Fqemu.git exec/gen-icount.h: Add missing "exec/exec-all.h" include When including "exec/gen-icount.h" we get: include/exec/gen-icount.h: In function ‘gen_tb_start’: include/exec/gen-icount.h:40:9: error: implicit declaration of function ‘tb_cflags’ [-Werror=implicit-function-declaration] 40 | if (tb_cflags(tb) & CF_USE_ICOUNT) { | ^~~~~~~~~ include/exec/gen-icount.h:40:9: error: nested extern declaration of ‘tb_cflags’ [-Werror=nested-externs] include/exec/gen-icount.h:40:25: error: ‘CF_USE_ICOUNT’ undeclared (first use in this function); did you mean ‘CPU_COUNT’? 40 | if (tb_cflags(tb) & CF_USE_ICOUNT) { | ^~~~~~~~~~~~~ | CPU_COUNT Since tb_cflags() is declared in "exec/exec-all.h", include this header in "exec/gen-icount.h". Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20210422064128.2318616-3-f4bug@amsat.org> Signed-off-by: Richard Henderson --- diff --git a/include/exec/gen-icount.h b/include/exec/gen-icount.h index 298e01eef49..467529d84c5 100644 --- a/include/exec/gen-icount.h +++ b/include/exec/gen-icount.h @@ -1,6 +1,7 @@ #ifndef GEN_ICOUNT_H #define GEN_ICOUNT_H +#include "exec/exec-all.h" #include "qemu/timer.h" /* Helpers for instruction counting code generation. */