[virt-tools-list] [PATCH] webdav support is not available for Windows
Fabiano Fidêncio
fidencio at redhat.com
Mon Jun 15 21:01:03 UTC 2015
As there is no Phodav support for Windows, spice-gtk ends up being
built without webdav support, what can cause a build breakage on
virt-viewer when compiled using mingw.
The build failure is:
virt-viewer-session-spice.c: In function 'virt_viewer_session_spice_can_share_folder':
virt-viewer-session-spice.c:165:64: error: 'SPICE_CHANNEL_WEBDAV' undeclared (first use in this function)
return spice_session_has_channel_type(self->priv->session, SPICE_CHANNEL_WEBDAV);
The mingw-spice-gtk version used is 0.29.
---
src/virt-viewer-session-spice.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/virt-viewer-session-spice.c b/src/virt-viewer-session-spice.c
index f763975..2690ebd 100644
--- a/src/virt-viewer-session-spice.c
+++ b/src/virt-viewer-session-spice.c
@@ -158,11 +158,15 @@ virt_viewer_session_spice_mime_type(VirtViewerSession *self G_GNUC_UNUSED)
}
static gboolean
-virt_viewer_session_spice_can_share_folder(VirtViewerSession *session)
+virt_viewer_session_spice_can_share_folder(VirtViewerSession *session G_GNUC_UNUSED)
{
+#ifndef G_OS_WIN32
VirtViewerSessionSpice *self = VIRT_VIEWER_SESSION_SPICE(session);
return spice_session_has_channel_type(self->priv->session, SPICE_CHANNEL_WEBDAV);
+#else
+ return FALSE;
+#endif
}
static void
@@ -986,6 +990,7 @@ name_changed(GObject *gobject G_GNUC_UNUSED,
g_free(name);
}
+#ifndef G_OS_WIN32
static void
update_share_folder(VirtViewerSessionSpice *self)
{
@@ -1010,6 +1015,7 @@ update_share_folder(VirtViewerSessionSpice *self)
g_list_free(channels);
}
+#endif
VirtViewerSession *
virt_viewer_session_spice_new(VirtViewerApp *app, GtkWindow *main_window)
@@ -1030,9 +1036,11 @@ virt_viewer_session_spice_new(VirtViewerApp *app, GtkWindow *main_window)
G_CALLBACK(uuid_changed), self, 0);
virt_viewer_signal_connect_object(self->priv->session, "notify::name",
G_CALLBACK(name_changed), self, 0);
+#ifndef G_OS_WIN32
virt_viewer_signal_connect_object(self, "notify::share-folder",
G_CALLBACK(update_share_folder), self,
G_CONNECT_SWAPPED);
+#endif
g_object_bind_property(self->priv->session, "shared-dir",
self, "shared-folder",
--
2.4.3
More information about the virt-tools-list
mailing list