block: always link with zlib
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 28 Aug 2020 17:32:40 +0000 (19:32 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 1 Sep 2020 05:51:51 +0000 (01:51 -0400)
The qcow2 driver needs the zlib dependency.  While emulators
provided it through the migration code, this is not true of
the tools.  Move the dependency from the qcow1 rule directly
into block_ss so that it is included unconditionally.

Fixes build with --disable-qcow1.

Reported-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Cc: qemu-block@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
block/meson.build

index 4dbbfe60b46ab113e60d04a87b3fb6f9087b84ae..a3e56b7cd11d202cb1d8a14bfac8019cc0ee40ca 100644 (file)
@@ -40,9 +40,9 @@ block_ss.add(files(
   'vmdk.c',
   'vpc.c',
   'write-threshold.c',
-), zstd)
+), zstd, zlib)
 
-block_ss.add(when: [zlib, 'CONFIG_QCOW1'], if_true: files('qcow.c'))
+block_ss.add(when: 'CONFIG_QCOW1', if_true: files('qcow.c'))
 block_ss.add(when: 'CONFIG_VDI', if_true: files('vdi.c'))
 block_ss.add(when: 'CONFIG_CLOOP', if_true: files('cloop.c'))
 block_ss.add(when: 'CONFIG_BOCHS', if_true: files('bochs.c'))