new file mode 100644
@@ -0,0 +1,13 @@
+#include "qemu-common.h"
+#include "ui/console.h"
+
+void qemu_spice_display_init(void)
+{
+ /* This must never be called if CONFIG_SPICE is disabled */
+ error_report("spice support is disabled");
+ abort();
+}
+
+void qemu_spice_init(void)
+{
+}
@@ -4386,10 +4386,8 @@ int main(int argc, char **argv, char **envp)
os_set_line_buffering();
-#ifdef CONFIG_SPICE
/* spice needs the timers to be initialized by this point */
qemu_spice_init();
-#endif
cpu_ticks_init();
if (icount_opts) {
@@ -4593,11 +4591,9 @@ int main(int argc, char **argv, char **envp)
g_free(ret);
}
-#ifdef CONFIG_SPICE
if (using_spice) {
qemu_spice_display_init();
}
-#endif
if (foreach_device_config(DEV_GDB, gdbserver_start) < 0) {
exit(1);
This reduces the number of CONFIG_SPICE #ifdefs in vl.c. Cc: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> --- stubs/spice.c | 13 +++++++++++++ vl.c | 4 ---- 2 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 stubs/spice.c