[virt-tools-list] [PATCH 2/2] Fix spice includes

Pavel Grunt pgrunt at redhat.com
Wed Nov 11 07:11:04 UTC 2015


Hi Eduardo,

these warnings were introduced after spice-gtk v0.30 release, virt-viewer
currently depends on spice-gtk v0.29.35. You can make the code conditional or
wait for the spice-gtk v0.31 release.

Pavel

On Tue, 2015-11-10 at 18:39 -0200, Eduardo Lima (Etrunko) wrote:
> Recent spice commit requires that only spice-client.h or
> spice-client-gtk.h should be included directly. As a resul
> t,
> compilation is now throwing warnings like:
> 
> warning: #warning "Only <spice-client.h> can be included directly" [-Wcpp]
> warning: #warning "Only <spice-client-gtk.h> can be included directly" [-Wcpp]
> 
> Signed-off-by: Eduardo Lima (Etrunko) <etrunko at redhat.com>
> ---
>  src/remote-viewer-main.c        | 2 +-
>  src/virt-viewer-display-spice.c | 2 +-
>  src/virt-viewer-display-spice.h | 3 +--
>  src/virt-viewer-main.c          | 2 +-
>  src/virt-viewer-session-spice.c | 5 +----
>  src/virt-viewer-session-spice.h | 3 +--
>  6 files changed, 6 insertions(+), 11 deletions(-)
> 
> diff --git a/src/remote-viewer-main.c b/src/remote-viewer-main.c
> index 81cf736..6ac2523 100644
> --- a/src/remote-viewer-main.c
> +++ b/src/remote-viewer-main.c
> @@ -34,7 +34,7 @@
>  #include <vncdisplay.h>
>  #endif
>  #ifdef HAVE_SPICE_GTK
> -#include <spice-option.h>
> +#include <spice-client.h>
>  #endif
>  #ifdef HAVE_OVIRT
>  #include <govirt/ovirt-options.h>
> diff --git a/src/virt-viewer-display-spice.c b/src/virt-viewer-display-spice.c
> index c3dbd75..ffe4e09 100644
> --- a/src/virt-viewer-display-spice.c
> +++ b/src/virt-viewer-display-spice.c
> @@ -25,7 +25,7 @@
>  #include <config.h>
>  
>  #include <math.h>
> -#include <spice-audio.h>
> +#include <spice-client-gtk.h>
>  
>  #include <glib/gi18n.h>
>  
> diff --git a/src/virt-viewer-display-spice.h b/src/virt-viewer-display-spice.h
> index 3c30270..598a1b7 100644
> --- a/src/virt-viewer-display-spice.h
> +++ b/src/virt-viewer-display-spice.h
> @@ -25,8 +25,7 @@
>  #define _VIRT_VIEWER_DISPLAY_SPICE_H
>  
>  #include <glib-object.h>
> -#include <spice-widget.h>
> -#include <spice-audio.h>
> +#include <spice-client.h>
>  
>  #include "virt-viewer-display.h"
>  #include "virt-viewer-session-spice.h"
> diff --git a/src/virt-viewer-main.c b/src/virt-viewer-main.c
> index 505b472..9b9807a 100644
> --- a/src/virt-viewer-main.c
> +++ b/src/virt-viewer-main.c
> @@ -29,7 +29,7 @@
>  #include <vncdisplay.h>
>  #endif
>  #ifdef HAVE_SPICE_GTK
> -#include <spice-option.h>
> +#include <spice-client.h>
>  #endif
>  #include "virt-viewer.h"
>  
> diff --git a/src/virt-viewer-session-spice.c b/src/virt-viewer-session-spice.c
> index b9cae5e..68afb0a 100644
> --- a/src/virt-viewer-session-spice.c
> +++ b/src/virt-viewer-session-spice.c
> @@ -24,12 +24,9 @@
>  
>  #include <config.h>
>  
> -#include <spice-audio.h>
>  #include <glib/gi18n.h>
>  
> -#include <spice-option.h>
> -#include <spice-util.h>
> -#include <spice-client.h>
> +#include <spice-client-gtk.h>
>  
>  #include <usb-device-widget.h>
>  #include "virt-viewer-file.h"
> diff --git a/src/virt-viewer-session-spice.h b/src/virt-viewer-session-spice.h
> index 95bdcdf..aa1f7e8 100644
> --- a/src/virt-viewer-session-spice.h
> +++ b/src/virt-viewer-session-spice.h
> @@ -25,8 +25,7 @@
>  #define _VIRT_VIEWER_SESSION_SPICE_H
>  
>  #include <glib-object.h>
> -#include <spice-widget.h>
> -#include <spice-audio.h>
> +#include <spice-client.h>
>  
>  #include "virt-viewer-session.h"
>  




More information about the virt-tools-list mailing list