From ffde99f4920fe60798d527c2bcdf91d1d2385b86 Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Tue, 19 Feb 2008 14:50:26 +0900 Subject: Use zlib if present 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. Cc: Jeremy Kerr Signed-off-by: Simon Horman --- kexec/Makefile | 1 + kexec/kexec.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/kexec/Makefile b/kexec/Makefile index 29534d0..7832a13 100644 --- a/kexec/Makefile +++ b/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 $@ $^ diff --git a/kexec/kexec.c b/kexec/kexec.c index abc1cce..4094dd7 100644 --- a/kexec/kexec.c +++ b/kexec/kexec.c @@ -32,7 +32,7 @@ #include "config.h" -#ifdef HAVE_ZLIB_H +#ifdef HAVE_LIBZ #include #endif #include @@ -446,7 +446,7 @@ char *slurp_file_len(const char *filename, off_t size) return buf; } -#if HAVE_ZLIB_H +#if HAVE_LIBZ char *slurp_decompress_file(const char *filename, off_t *r_size) { gzFile fp; -- cgit