public inbox for linux-erofs@ozlabs.org
 help / color / mirror / Atom feed
* [PATCH] erofs-utils: lib: guard gzran zlib.h inclusion
@ 2026-03-17 12:24 Matthew Lear
  2026-03-17 15:29 ` Gao Xiang
  0 siblings, 1 reply; 2+ messages in thread
From: Matthew Lear @ 2026-03-17 12:24 UTC (permalink / raw)
  To: linux-erofs; +Cc: Matthew Lear

gzran.c unconditionally includes zlib.h which doesn't compile on
systems without zlib.

Signed-off-by: Matthew Lear <matthew.lear@raspberrypi.com>
---
 lib/gzran.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/gzran.c b/lib/gzran.c
index dffb20a..bf99796 100644
--- a/lib/gzran.c
+++ b/lib/gzran.c
@@ -6,9 +6,9 @@
 #include "erofs/err.h"
 #include "liberofs_gzran.h"
 #include <stdlib.h>
-#include <zlib.h>

 #ifdef HAVE_ZLIB
+#include <zlib.h>
 struct erofs_gzran_cutpoint {
 	u8	window[EROFS_GZRAN_WINSIZE];	/* preceding 32K of uncompressed data */
 	u64	outpos;			/* corresponding offset in uncompressed data */
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-03-17 15:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-17 12:24 [PATCH] erofs-utils: lib: guard gzran zlib.h inclusion Matthew Lear
2026-03-17 15:29 ` Gao Xiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox