Skip to contentSkip to conversation

Use zlib if present

PATCH Simon Horman 2 participants 2 messages Feb 19, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi,

This fixes a minor regression that occured with Jeremy's recent reworking of the build system. I guess he wasn't dealing with compressed images and thus didn't notice that zlib support had been disabled.

The fix involves updating an #ifdef to use the new symbol, and ensuring that -lz is passed to the linker as neccessary.

---

 kexec/Makefile |    1 +
 kexec/kexec.c  |    4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
kexec/kexec.c +2 -2
Index: kexec-tools-testing/kexec/kexec.c
===================================================================
@@ -32,7 +32,7 @@
 
 #include "config.h"
 
-#ifdef HAVE_ZLIB_H
+#ifdef HAVE_LIBZ
 #include <zlib.h>
 #endif
 #include <sha256.h>
@@ -446,7 +446,7 @@ char *slurp_file_len(const char *filenam
 	return buf;
 }
 
-#if HAVE_ZLIB_H
+#if HAVE_LIBZ
 char *slurp_decompress_file(const char *filename, off_t *r_size)
 {
 	gzFile fp;
kexec/Makefile +1 -0
Index: kexec-tools-testing/kexec/Makefile
===================================================================
@@ -36,6 +36,7 @@ KEXEC_MANPAGE = $(MANDIR)/man8/kexec.8
 
 -include $(KEXEC_DEPS)
 
+$(KEXEC): LDFLAGS+=$(LIBS)
 $(KEXEC): $(KEXEC_OBJS) $(UTIL_LIB)
 	@$(MKDIR) -p $(@D)
 	$(LINK.o) -o $@ $^

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

Acked-by
#1 lore raw

Hi Simon,

Quoted 4 lines

This fixes a minor regression that occured with Jeremy's recent reworking of the build system. I guess he wasn't dealing with compressed images and thus didn't notice that zlib support had been disabled.

eep, sorry about that. I wasn't using compressed images.

Quoted 2 lines

The fix involves updating an #ifdef to use the new symbol, and ensuring that -lz is passed to the linker as neccessary.

Cheers,

Jeremy

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec