--- a/include/image.h
+++ b/include/image.h
@@ -51,6 +51,10 @@ struct lmb;
#endif /* USE_HOSTCC */
+#ifndef ulong
+#define ulong unsigned long
+#endif
+
#if IMAGE_ENABLE_FIT
#include <hash.h>
#include <linux/libfdt.h>