Patchwork qemu: Fix build failure without VNC support

login
register
mail settings
Submitter Boris Dolgov
Date Sept. 14, 2011, 2:16 p.m.
Message ID <CAEXQZf2g-gTdoCY6cJizcFCOP+LhCZ4sVZeXamccF_wu3jEj-g@mail.gmail.com>
Download mbox | patch
Permalink /patch/114683/
State New
Headers show

Comments

Boris Dolgov - Sept. 14, 2011, 2:16 p.m.
Hello!

Qemu 0.15.0 doesn't build with vnc support disabled. The following
patch fixes the problem.

Signed-off-by: Boris Dolgov <boris@dolgov.name>

--
Anthony Liguori - Sept. 16, 2011, 1:13 p.m.
On 09/14/2011 09:16 AM, Boris Dolgov wrote:
> Hello!
>
> Qemu 0.15.0 doesn't build with vnc support disabled. The following
> patch fixes the problem.
>
> Signed-off-by: Boris Dolgov<boris@dolgov.name>

Please submit patches against the latest git tree (and use git diff to generate 
the diff).

Regards,

Anthony Liguori

>
> --
>
> --- monitor.c.orig	2011-09-14 18:11:12.235199764 +0400
> +++ monitor.c	2011-09-14 18:12:19.187709823 +0400
> @@ -1200,10 +1200,12 @@ static int add_graphics_client(Monitor *
>           }
>   	qerror_report(QERR_ADD_CLIENT_FAILED);
>   	return -1;
> +#ifdef CONFIG_VNC
>       } else if (strcmp(protocol, "vnc") == 0) {
>   	int fd = monitor_get_fd(mon, fdname);
>   	vnc_display_add_client(NULL, fd, skipauth);
>   	return 0;
> +#endif
>       } else if ((s = qemu_chr_find(protocol)) != NULL) {
>   	int fd = monitor_get_fd(mon, fdname);
>   	if (qemu_chr_add_client(s, fd)<  0) {
>
>
Luiz Capitulino - Sept. 16, 2011, 1:23 p.m.
On Fri, 16 Sep 2011 08:13:29 -0500
Anthony Liguori <anthony@codemonkey.ws> wrote:

> On 09/14/2011 09:16 AM, Boris Dolgov wrote:
> > Hello!
> >
> > Qemu 0.15.0 doesn't build with vnc support disabled. The following
> > patch fixes the problem.
> >
> > Signed-off-by: Boris Dolgov<boris@dolgov.name>
> 
> Please submit patches against the latest git tree (and use git diff to generate 
> the diff).

It's for stable. I'll submit it there myself.

Patch

--- monitor.c.orig	2011-09-14 18:11:12.235199764 +0400
+++ monitor.c	2011-09-14 18:12:19.187709823 +0400
@@ -1200,10 +1200,12 @@  static int add_graphics_client(Monitor *
         }
 	qerror_report(QERR_ADD_CLIENT_FAILED);
 	return -1;
+#ifdef CONFIG_VNC
     } else if (strcmp(protocol, "vnc") == 0) {
 	int fd = monitor_get_fd(mon, fdname);
 	vnc_display_add_client(NULL, fd, skipauth);
 	return 0;
+#endif
     } else if ((s = qemu_chr_find(protocol)) != NULL) {
 	int fd = monitor_get_fd(mon, fdname);
 	if (qemu_chr_add_client(s, fd) < 0) {