From 0dc41e4b0cdcb65e217995db2160bf9cd14f0503 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Fri, 17 Feb 2012 09:45:58 +0100 Subject: [PATCH 1/5] fix build without spice RH-Author: Gerd Hoffmann Message-id: <1329471958-20487-1-git-send-email-kraxel@redhat.com> Patchwork-id: 37401 O-Subject: [RHEL-6.3 qemu-kvm PATCH] fix build without spice Bugzilla: 674583 RH-Acked-by: Markus Armbruster RH-Acked-by: Amit Shah RH-Acked-by: Kevin Wolf Commit 1c6074d107dff93c7c7b0edfb5da871504802946 added a hard dependency on spice, breaking the build without CONFIG_SPICE. Fix by sprinkling in some #ifdefs. bugzilla: #674583 -- qemu-kvm build fails without --enable-spice upstream: no, bug is in rh-only patch. Signed-off-by: Gerd Hoffmann --- monitor.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) Signed-off-by: Michal Novotny --- monitor.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/monitor.c b/monitor.c index 74bb5e3..0d62df7 100644 --- a/monitor.c +++ b/monitor.c @@ -30,7 +30,9 @@ #include "hw/pci.h" #include "hw/watchdog.h" #include "hw/loader.h" +#ifdef CONFIG_SPICE #include "hw/qxl.h" +#endif #include "gdbstub.h" #include "net.h" #include "net/slirp.h" @@ -1314,8 +1316,12 @@ static int rhel6_qxl_do_screen_dump(Monitor *mon, const QDict *qdict, QObject ** { int ret; +#ifdef CONFIG_SPICE ret = rhel6_qxl_screendump(qdict_get_str(qdict, "id"), qdict_get_str(qdict, "filename")); +#else + ret = -1; +#endif if (ret != 0) { qerror_report(QERR_UNDEFINED_ERROR); return -1; -- 1.7.7.6