[virt-tools-list] [PATCH virt-viewer 4/9] Limit HAVE_SOCKETPAIR to directly concerned code
Christophe Fergeau
cfergeau at redhat.com
Fri Nov 14 11:01:44 UTC 2014
You need to squash something like:
diff --git a/src/virt-viewer.c b/src/virt-viewer.c
index e294c34..d2f3106 100644
--- a/src/virt-viewer.c
+++ b/src/virt-viewer.c
@@ -465,10 +465,12 @@ virt_viewer_update_display(VirtViewer *self, virDomainPtr dom)
static gboolean
virt_viewer_open_connection(VirtViewerApp *self G_GNUC_UNUSED, int *fd)
{
-#if defined(HAVE_SOCKETPAIR)
VirtViewer *viewer = VIRT_VIEWER(self);
VirtViewerPrivate *priv = viewer->priv;
+#if defined(HAVE_SOCKETPAIR)
int pair[2];
+#endif
+#if defined(HAVE_SOCKETPAIR) || defined(HAVE_VIR_DOMAIN_OPEN_GRAPHICS_FD)
virErrorPtr err;
#endif
*fd = -1;
or this will break compilation in some cases.
ACK with this fixed.
On Thu, Nov 13, 2014 at 06:20:40PM +0100, Marc-André Lureau wrote:
> ---
> src/virt-viewer.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/virt-viewer.c b/src/virt-viewer.c
> index 19aa6ed..ae522bc 100644
> --- a/src/virt-viewer.c
> +++ b/src/virt-viewer.c
> @@ -471,7 +471,7 @@ virt_viewer_open_connection(VirtViewerApp *self G_GNUC_UNUSED, int *fd)
> virErrorPtr err;
> #endif
> *fd = -1;
> -#if defined(HAVE_SOCKETPAIR)
> +
> if (!priv->dom)
> return TRUE;
>
> @@ -487,6 +487,7 @@ virt_viewer_open_connection(VirtViewerApp *self G_GNUC_UNUSED, int *fd)
> }
> #endif
>
> +#if defined(HAVE_SOCKETPAIR)
> if (socketpair(PF_UNIX, SOCK_STREAM, 0, pair) < 0)
> return FALSE;
>
> --
> 1.9.3
>
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20141114/daf62e1d/attachment.sig>
More information about the virt-tools-list
mailing list