Skip to contentSkip to conversation

Fix Compilation Errors with 'tools/env/fw_printenv'

PATCH New Grant Erickson 2 participants 2 messages May 6, 2008 – May 9, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix Compilation Errors with 'tools/env/fw_printenv'

In the current top-of-tree, 1.3.3.-rc2, the optional tool 'tools/env/fw_printenv' fails to compile for two reasons:

1) The header watchdog.h cannot be found.
2) The header zlib.h is picked up from the tool chain rather than the project causing a prototype conflict for crc32.

This patch addresses both of these issues.

Platforms Tested On:
- AMCC "Kilauea"

---
 lib_generic/crc32.c |    2 ++
 tools/env/Makefile  |    2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)
lib_generic/crc32.c +2 -0
index 64f66ed..83d1d1d 100644
@@ -14,7 +14,9 @@
 #include <stdint.h>
 #endif
 
+#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)
 #include <watchdog.h>
+#endif
 #include "zlib.h"
 
 #define local static
tools/env/Makefile +1 -1
index ea2d5b5..9629ee5 100644
@@ -26,7 +26,7 @@ include $(TOPDIR)/config.mk
 SRCS	:= $(obj)crc32.c  fw_env.c  fw_env_main.c
 HEADERS	:= fw_env.h
 
-CPPFLAGS := -Wall -DUSE_HOSTCC
+CPPFLAGS := -Wall -DUSE_HOSTCC -I$(SRCTREE)/include
 
 ifeq ($(MTD_VERSION),old)
 CPPFLAGS += -DMTD_OLD
Signature · 1 line
1.5.4.3
#1 lore raw

PATCH 1/1 Fix Compilation Errors with 'tools/env/fw_printenv'

Quoted 7 lines · In message <[email protected]> you…

In the current top-of-tree, 1.3.3.-rc2, the optional tool 'tools/env/fw_printenv' fails to compile for two reasons:

1) The header watchdog.h cannot be found.
2) The header zlib.h is picked up from the tool chain rather than the project causing a prototype conflict for crc32.

This patch addresses both of these issues.

Quoted 8 lines

Platforms Tested On:
- AMCC "Kilauea"

---
 lib_generic/crc32.c |    2 ++
 tools/env/Makefile  |    2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
When choosing between two evils, I always like to take the  one  I've
never tried before.                     -- Mae West, "Klondike Annie"