Patchwork QEMU_OPTION_spice is not guarded by ifdef

login
register
mail settings
Submitter Roy Tam
Date Oct. 26, 2010, 11:33 a.m.
Message ID <AANLkTikyowWtW20bCCExc8GBek2ZN7JZ4-W0nZsPA2FN@mail.gmail.com>
Download mbox | patch
Permalink /patch/69235/
State New
Headers show

Comments

Roy Tam - Oct. 26, 2010, 11:33 a.m.
Hi all,

commit 29b0040be6371c403dae0fef7fec36b814e300e8 breaks building when
"--disable-spice" configure switch is used. The following patch fix
this.

Best regards,
Roy

Signed-off-by: Roy Tam <roytam@gmail.com>
---
Gerd Hoffmann - Oct. 26, 2010, 12:12 p.m.
On 10/26/10 13:33, Roy Tam wrote:
> Hi all,
>
> commit 29b0040be6371c403dae0fef7fec36b814e300e8 breaks building when
> "--disable-spice" configure switch is used. The following patch fix
> this.

Huh?  It builds fine for me.  What build failure do you get?

cheers,
   Gerd
Roy Tam - Oct. 26, 2010, 1:33 p.m.
2010/10/26 Gerd Hoffmann <kraxel@redhat.com>:
> On 10/26/10 13:33, Roy Tam wrote:
>>
>> Hi all,
>>
>> commit 29b0040be6371c403dae0fef7fec36b814e300e8 breaks building when
>> "--disable-spice" configure switch is used. The following patch fix
>> this.
>
> Huh?  It builds fine for me.  What build failure do you get?
>

I did a "make clean" before but I am still getting error about
QEMU_OPTION_spice.
Log:
(...)
  LINK  qemu-io.exe
  GEN   libhw32/qemu-options.def
  CC    libhw32/vl.o
C:/msys/home/User/qemu/vl.c: In function `qemu_main':
C:/msys/home/User/qemu/vl.c:2601: error: `QEMU_OPTION_spice'
undeclared (first use in this function)
C:/msys/home/User/qemu/vl.c:2601: error: (Each undeclared identifier
is reported only once
C:/msys/home/User/qemu/vl.c:2601: error: for each function it appears in.)
make[1]: *** [vl.o] Error 1
make: *** [subdir-libhw32] Error 2


> cheers,
>  Gerd
>
>
>
Gerd Hoffmann - Oct. 27, 2010, 9:06 a.m.
> I did a "make clean" before but I am still getting error about
> QEMU_OPTION_spice.
> Log:
> (...)
>    LINK  qemu-io.exe
>    GEN   libhw32/qemu-options.def
>    CC    libhw32/vl.o
> C:/msys/home/User/qemu/vl.c: In function `qemu_main':
> C:/msys/home/User/qemu/vl.c:2601: error: `QEMU_OPTION_spice'
> undeclared (first use in this function)

Ah, windows.

/me tries a cross build.

Works fine for me.

cheers,
   Gerd

Patch

diff --git a/vl.c b/vl.c
index 7038952..6352673 100644
--- a/vl.c
+++ b/vl.c
@@ -2594,6 +2594,7 @@  int main(int argc, char **argv, char **envp)
                     }
                     break;
                 }
+#ifdef CONFIG_SPICE
             case QEMU_OPTION_spice:
                 olist = qemu_find_opts("spice");
                 if (!olist) {
@@ -2606,6 +2607,7 @@  int main(int argc, char **argv, char **envp)
                     exit(1);
                 }
                 break;
+#endif
             case QEMU_OPTION_writeconfig:
                 {
                     FILE *fp;