--- a/include/image.h
+++ b/include/image.h
@@ -61,6 +61,10 @@
#endif /* USE_HOSTCC */
+#ifndef ulong
+#define ulong unsigned long
+#endif
+
#if defined(CONFIG_FIT)
#include <libfdt.h>
#include <fdt_support.h>