]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
hw/core/machine: Add missing 'units.h' and 'error-report.h' headers
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Mon, 30 Sep 2024 10:33:28 +0000 (12:33 +0200)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 5 Nov 2024 23:32:25 +0000 (23:32 +0000)
Include the missing "qemu/units.h" to fix when refactoring code:

  ../hw/core/machine.c:743:34: error: use of undeclared identifier 'MiB'
  743 |     mc->default_ram_size = 128 * MiB;
      |                                  ^
  ../hw/core/machine.c:750:44: error: use of undeclared identifier 'TiB'
  750 |     mc->smbios_memory_device_size = 2047 * TiB;
      |                                            ^

and "qemu/error-report.h" to fix:

  ../hw/core/machine.c:1029:13: error: call to undeclared function 'error_report' [-Wimplicit-function-declaration]
 1029 |             error_report("NUMA node %" PRIu16 " is missing, use "
      |             ^
  ../hw/core/machine.c:1240:9: error: call to undeclared function 'warn_report' [-Wimplicit-function-declaration]
 1240 |         warn_report("CPU model %s is deprecated -- %s",
      |         ^

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Message-Id: <20240930221900.59525-2-philmd@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
hw/core/machine.c

index 901c64b042df44f1c57bb3093b9e38e5c8418b30..fd3716b7dfde74cb9cc1d752a96df5ae21be85fe 100644 (file)
  */
 
 #include "qemu/osdep.h"
+#include "qemu/units.h"
 #include "qemu/accel.h"
 #include "sysemu/replay.h"
 #include "hw/boards.h"
 #include "hw/loader.h"
+#include "qemu/error-report.h"
 #include "qapi/error.h"
 #include "qapi/qapi-visit-machine.h"
 #include "qemu/madvise.h"