]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
Fix Compilation Errors with 'tools/env/fw_printenv'
authorGrant Erickson <gerickson@nuovations.com>
Tue, 6 May 2008 23:18:00 +0000 (16:18 -0700)
committerWolfgang Denk <wd@denx.de>
Fri, 9 May 2008 21:04:41 +0000 (23:04 +0200)
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"

Signed-off-by: Grant Erickson <gerickson@nuovations.com>
lib_generic/crc32.c
tools/env/Makefile

index 64f66ed6fb176b08b23132927b2e64ade5208145..83d1d1d3a0d180d85a2e6d7af7c73ec15a2f5651 100644 (file)
@@ -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
index ea2d5b5a01b9937e4dd5da492a096b1731bab427..9629ee58ef1298d5ef8edfad8b6e329fb61131fb 100644 (file)
@@ -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