summaryrefslogtreecommitdiff
path: root/include/environment.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/environment.h')
-rw-r--r--include/environment.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/environment.h b/include/environment.h
index af605ab7a9..c4f7c33be6 100644
--- a/include/environment.h
+++ b/include/environment.h
@@ -84,18 +84,23 @@
# endif
#endif /* CFG_ENV_IS_IN_NAND */
+#ifdef USE_HOSTCC
+# include <stdint.h>
+#else
+# include <linux/types.h>
+#endif
#ifdef CFG_REDUNDAND_ENVIRONMENT
-# define ENV_HEADER_SIZE (sizeof(unsigned long) + 1)
+# define ENV_HEADER_SIZE (sizeof(uint32_t) + 1)
#else
-# define ENV_HEADER_SIZE (sizeof(unsigned long))
+# define ENV_HEADER_SIZE (sizeof(uint32_t))
#endif
#define ENV_SIZE (CFG_ENV_SIZE - ENV_HEADER_SIZE)
typedef struct environment_s {
- unsigned long crc; /* CRC32 over data bytes */
+ uint32_t crc; /* CRC32 over data bytes */
#ifdef CFG_REDUNDAND_ENVIRONMENT
unsigned char flags; /* active/obsolete flags */
#endif