We need to include <linux/kconfig.h> in order to include files that use CONFIG_IS_ENABLED. TO prepare for that don't pet the watchdog when USE_HOSTCC is defined.
Signed-off-by: Troy Kisky <[email protected]> --- lib/sha1.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/sha1.c b/lib/sha1.c index 8d074078934..af49535e5d2 100644 --- a/lib/sha1.c +++ b/lib/sha1.c @@ -19,7 +19,11 @@ #ifndef USE_HOSTCC #include <common.h> #include <linux/string.h> +#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) +#define PET_WDG +#endif #else +#include <linux/kconfig.h> #include <string.h> #endif /* USE_HOSTCC */ #include <watchdog.h> @@ -328,14 +332,14 @@ void sha1_csum_wd(const unsigned char *input, unsigned int ilen, unsigned char *output, unsigned int chunk_sz) { sha1_context ctx; -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) +#ifdef PET_WDG const unsigned char *end, *curr; int chunk; #endif sha1_starts (&ctx); -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) +#ifdef PET_WDG curr = input; end = input + ilen; while (curr < end) { -- 2.34.1

