peterdelevoryas / rpms / qemu

Forked from rpms/qemu 2 years ago
Clone

Blame 0027-ifdef-new-config-options.patch

Justin M. Forbes a81953
From 9200133d24ee5b5dab71ce922882c3534d9e8a5a Mon Sep 17 00:00:00 2001
Justin M. Forbes a81953
From: Gerd Hoffmann <kraxel@redhat.com>
Justin M. Forbes a81953
Date: Thu, 15 Jul 2010 09:01:28 +0200
Justin M. Forbes a81953
Subject: [PATCH 27/39] ifdef new config options.
Justin M. Forbes a81953
Justin M. Forbes a81953
---
Justin M. Forbes a81953
 spice.c |    6 +++++-
Justin M. Forbes a81953
 1 files changed, 5 insertions(+), 1 deletions(-)
Justin M. Forbes a81953
Justin M. Forbes a81953
diff --git a/spice.c b/spice.c
Justin M. Forbes a81953
index 201e53c..76e6ac1 100644
Justin M. Forbes a81953
--- a/spice.c
Justin M. Forbes a81953
+++ b/spice.c
Justin M. Forbes a81953
@@ -207,6 +207,7 @@ int mon_spice_migrate(Monitor *mon, const QDict *qdict, QObject **ret_data)
Justin M. Forbes a81953
                                      port, tls_port, subject);
Justin M. Forbes a81953
 }
Justin M. Forbes a81953
Justin M. Forbes a81953
+#if defined(SPICE_SERVER_VERSION) && SPICE_SERVER_VERSION >= 0x000503
Justin M. Forbes a81953
 static inline spice_wan_compression_t get_wan_compression_value(const char *str)
Justin M. Forbes a81953
 {
Justin M. Forbes a81953
     if (!strcmp(str, "wan")) {
Justin M. Forbes a81953
@@ -223,6 +224,7 @@ static inline spice_wan_compression_t get_wan_compression_value(const char *str)
Justin M. Forbes a81953
Justin M. Forbes a81953
     return SPICE_WAN_COMPRESSION_INVALID;
Justin M. Forbes a81953
 }
Justin M. Forbes a81953
+#endif
Justin M. Forbes a81953
Justin M. Forbes a81953
 void qemu_spice_init(void)
Justin M. Forbes a81953
 {
Justin M. Forbes a81953
@@ -235,7 +237,6 @@ void qemu_spice_init(void)
Justin M. Forbes a81953
         *x509_cert_file = NULL,
Justin M. Forbes a81953
         *x509_cacert_file = NULL;
Justin M. Forbes a81953
     int port, tls_port, len;
Justin M. Forbes a81953
-    const char *jpeg, *zlib_glz;
Justin M. Forbes a81953
Justin M. Forbes a81953
     if (!opts)
Justin M. Forbes a81953
         return;
Justin M. Forbes a81953
@@ -301,6 +302,8 @@ void qemu_spice_init(void)
Justin M. Forbes a81953
     /* TODO: make configurable via cmdline */
Justin M. Forbes a81953
     spice_server_set_image_compression(spice_server, SPICE_IMAGE_COMPRESS_AUTO_GLZ);
Justin M. Forbes a81953
Justin M. Forbes a81953
+#if defined(SPICE_SERVER_VERSION) && SPICE_SERVER_VERSION >= 0x000503
Justin M. Forbes a81953
+    const char *jpeg, *zlib_glz;
Justin M. Forbes a81953
     jpeg = qemu_opt_get(opts, "jpeg");
Justin M. Forbes a81953
     zlib_glz = qemu_opt_get(opts, "zlib-glz");
Justin M. Forbes a81953
Justin M. Forbes a81953
@@ -311,6 +314,7 @@ void qemu_spice_init(void)
Justin M. Forbes a81953
     if (zlib_glz) {
Justin M. Forbes a81953
         spice_server_set_zlib_glz_compression(spice_server, get_wan_compression_value(zlib_glz));
Justin M. Forbes a81953
     }
Justin M. Forbes a81953
+#endif
Justin M. Forbes a81953
Justin M. Forbes a81953
     spice_server_init(spice_server, &core_interface);
Justin M. Forbes a81953
     using_spice = 1;
Justin M. Forbes a81953
-- 
Justin M. Forbes a81953
1.7.2.3
Justin M. Forbes a81953