block: always link with zlib

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>
This commit is contained in:
Paolo Bonzini 2020-08-28 19:32:40 +02:00
parent 46504430e6
commit a10c8516ed
1 changed files with 2 additions and 2 deletions

View 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'))