[virt-tools-list] [PATCH 1/2] Add missing ifdef HAVE_OVIRT (virt-viewer-window.c)

Uri Lublin uril at redhat.com
Tue Mar 7 10:18:49 UTC 2017


Currently the build fails when configured without-ovirt (snipped a bit):
make[3]: Entering directory 'virt-viewer/src'
  CCLD     remote-viewer
./.libs/libvirt-viewer.a(libvirt_viewer_la-virt-viewer-window.o):
  In function `virt_viewer_window_menu_change_cd_activate':
  src/virt-viewer-window.c:1082: undefined reference to
  `remote_viewer_iso_list_dialog_new'

The missing function, remote_viewer_iso_list_dialog_new, is called
from src/virt-viewer-window.c:virt_viewer_window_menu_change_cd_activate
and is defined in src/remote-viewer-iso-list-dialog.c

src/remote-viewer-iso-list-dialog.c is only built when HAVE_OVIRT
is defined.

This patch adds HAVE_OVIRT ifdefs in src/virt-viewer-window.c.

Signed-off-by: Uri Lublin <uril at redhat.com>
---
 src/virt-viewer-window.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c
index 8eda12e..ff7b102 100644
--- a/src/virt-viewer-window.c
+++ b/src/virt-viewer-window.c
@@ -43,7 +43,9 @@
 #include "virt-viewer-util.h"
 #include "virt-viewer-timed-revealer.h"
 
+#ifdef HAVE_OVIRT
 #include "remote-viewer-iso-list-dialog.h"
+#endif
 
 #define ZOOM_STEP 10
 
@@ -64,7 +66,9 @@ void virt_viewer_window_menu_file_smartcard_insert(GtkWidget *menu, VirtViewerWi
 void virt_viewer_window_menu_file_smartcard_remove(GtkWidget *menu, VirtViewerWindow *self);
 void virt_viewer_window_menu_view_release_cursor(GtkWidget *menu, VirtViewerWindow *self);
 void virt_viewer_window_menu_preferences_cb(GtkWidget *menu, VirtViewerWindow *self);
+#ifdef HAVE_OVIRT
 void virt_viewer_window_menu_change_cd_activate(GtkWidget *menu, VirtViewerWindow *self);
+#endif
 
 
 /* Internal methods */
@@ -1059,6 +1063,7 @@ virt_viewer_window_menu_help_about(GtkWidget *menu G_GNUC_UNUSED,
     g_object_unref(G_OBJECT(about));
 }
 
+#ifdef HAVE_OVIRT
 static void
 iso_dialog_response(GtkDialog *dialog,
                     gint response_id,
@@ -1093,6 +1098,7 @@ virt_viewer_window_menu_change_cd_activate(GtkWidget *menu G_GNUC_UNUSED,
     gtk_widget_show_all(dialog);
     gtk_dialog_run(GTK_DIALOG(dialog));
 }
+#endif
 
 static void
 virt_viewer_window_toolbar_setup(VirtViewerWindow *self)
-- 
2.9.3




More information about the virt-tools-list mailing list