new file mode 100644
@@ -0,0 +1,4 @@
+#include "qemu/osdep.h"
+#include "sysemu/sysemu.h"
+
+bool machine_init_done = true;
similarity index 78%
rename from stubs/machine-init-done.c
rename to stubs/machine-notify.c
@@ -1,8 +1,6 @@
#include "qemu/osdep.h"
#include "sysemu/sysemu.h"
-bool machine_init_done = true;
-
void qemu_add_machine_init_done_notifier(Notifier *notify)
{
}
@@ -15,7 +15,8 @@ stub-obj-y += iothread-lock.o
stub-obj-y += is-daemonized.o
stub-obj-$(CONFIG_LINUX_AIO) += linux-aio.o
stub-obj-$(CONFIG_LINUX_IO_URING) += io_uring.o
-stub-obj-y += machine-init-done.o
+stub-obj-y += machine-init.o
+stub-obj-$(CONFIG_SOFTMMU) += machine-notify.o
stub-obj-y += migr-blocker.o
stub-obj-y += change-state-handler.o
stub-obj-y += monitor.o
As the machine notify handlers are only used in system emulation, split the current file in two, and only build the notifier when system emulation is used. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> --- stubs/machine-init.c | 4 ++++ stubs/{machine-init-done.c => machine-notify.c} | 2 -- stubs/Makefile.objs | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 stubs/machine-init.c rename stubs/{machine-init-done.c => machine-notify.c} (78%)