From: Jeroen Hofstee <jeroen@myspectrum.nl>
Date: Wed, 25 Jun 2014 21:02:21 +0000 (+0200)
Subject: tools: compiler.h: add missing time.h
X-Git-Tag: v2025.01-rc5-pxa1908~15022
X-Git-Url: http://git.dujemihanovic.xyz/html/static/gitweb.css?a=commitdiff_plain;h=9d16e93dc25025b29d3450537d180fd6e7c72e00;p=u-boot.git

tools: compiler.h: add missing time.h

genimg_print_time uses time_t, but time.h is never included.
Linux gets away with this since types.h includes time.h.
Explicitly include the header file so building on e.g. FreeBSD
also works.

cc: Tom Rini <trini@ti.com>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
---

diff --git a/include/compiler.h b/include/compiler.h
index 0734ed4942..9afc11be19 100644
--- a/include/compiler.h
+++ b/include/compiler.h
@@ -48,6 +48,7 @@
 # include <machine/endian.h>
 typedef unsigned long ulong;
 #endif
+#include <time.h>
 
 typedef uint8_t __u8;
 typedef uint16_t __u16;