[PATCH] migration: Remove unnecessary zlib include from qemu-file.h

Chad Jablonski posted 1 patch 1 month, 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20251219014512.387773-1-chad@jablonski.xyz
Maintainers: Peter Xu <peterx@redhat.com>, Fabiano Rosas <farosas@suse.de>
migration/qemu-file.h | 1 -
1 file changed, 1 deletion(-)
[PATCH] migration: Remove unnecessary zlib include from qemu-file.h
Posted by Chad Jablonski 1 month, 3 weeks ago
Commit 70eb5fde05 removed zlib from the libmigration dependencies but
missed removing the zlib include from the header file. zlib doesn't
appear to be used anywhere in qemu-file.h. This is fine in most
environments where zlib is nearly always in the default include path but
breaks the build when it isn't (NixOS for example).

Fixes: 70eb5fde05 ("migration: remove unnecessary zlib dependency")
Signed-off-by: Chad Jablonski <chad@jablonski.xyz>
---
 migration/qemu-file.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/migration/qemu-file.h b/migration/qemu-file.h
index c13c967167..c50a3fee53 100644
--- a/migration/qemu-file.h
+++ b/migration/qemu-file.h
@@ -25,7 +25,6 @@
 #ifndef MIGRATION_QEMU_FILE_H
 #define MIGRATION_QEMU_FILE_H
 
-#include <zlib.h>
 #include "exec/cpu-common.h"
 #include "io/channel.h"
 
-- 
2.51.2
Re: [PATCH] migration: Remove unnecessary zlib include from qemu-file.h
Posted by Philippe Mathieu-Daudé 1 month, 3 weeks ago
On 19/12/25 02:45, Chad Jablonski wrote:
> Commit 70eb5fde05 removed zlib from the libmigration dependencies but
> missed removing the zlib include from the header file. zlib doesn't
> appear to be used anywhere in qemu-file.h. This is fine in most
> environments where zlib is nearly always in the default include path but
> breaks the build when it isn't (NixOS for example).
> 
> Fixes: 70eb5fde05 ("migration: remove unnecessary zlib dependency")
> Signed-off-by: Chad Jablonski <chad@jablonski.xyz>
> ---
>   migration/qemu-file.h | 1 -
>   1 file changed, 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>