[U-Boot] [PATCH] zlib.c: avoid build conflicts for cradle board

Wolfgang Denk wd at denx.de
Sun Dec 6 01:11:25 CET 2009


Commit dce3d79710 updated the zlib code to v0.95; this caused
conflicts when building for the "cradle" board, because the (pretty
generic) preprocessor variable "OFF" was used in multiple files.
Make sure to avoid further conflicts by #undef'ing it in zlib.c
before redefining it.

Signed-off-by: Wolfgang Denk <wd at denx.de>
cc: Giuseppe Condorelli <giuseppe.condorelli at st.com>
cc: Angelo Castello <angelo.castello at st.com>
cc: Alessandro Rubini <rubini-list at gnudd.com>
---
 lib_generic/zlib.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/lib_generic/zlib.c b/lib_generic/zlib.c
index 8fe3bd0..ef1fa22 100644
--- a/lib_generic/zlib.c
+++ b/lib_generic/zlib.c
@@ -28,6 +28,8 @@
 
 #include "u-boot/zlib.h"
 #include <common.h>
+#undef	OFF				/* avoid conflicts */
+
 /* To avoid a build time warning */
 #ifdef STDC
 #include <malloc.h>
-- 
1.6.2.5



More information about the U-Boot mailing list