[PATCH] build: fix uboot-rockchip on macos

Ronny Kotzschmar ro.ok at me.com
Tue Mar 23 17:44:30 GMT 2021


Add type definitions for unsigned "long long" 64-bit types
as in asm-generic/int-ll64.h / uapi/asm-generic/int-ll64.h.

Without this you get the following error:

  HOSTCC  tools/aisimage.o
In file included from tools/aisimage.c:9:
In file included from include/image.h:19:
In file included from ./arch/arm/include/asm/byteorder.h:29:
In file included from include/linux/byteorder/little_endian.h:13:
include/linux/types.h:146:9: error: unknown type name '__u64'; did you mean '__s64'?
typedef __u64 __bitwise __le64;
        ^
/work/openwrt/staging_dir/host/include/asm/types.h:19:44: note: '__s64' declared here
__extension__ typedef __signed__ long long __s64;
                                           ^

Signed-off-by: Ronny Kotzschmar <ro.ok at me.com>

diff --git a/tools/include/asm/types.h b/tools/include/asm/types.h
index 2c91232619..5a12bbe91b 100644
--- a/tools/include/asm/types.h
+++ b/tools/include/asm/types.h
@@ -10,15 +10,20 @@
 #define _ASM_GENERIC_INT_LL64_H
 
 typedef __signed__ char __s8;
+typedef unsigned char __u8;
 
 typedef __signed__ short __s16;
+typedef unsigned short __u16;
 
 typedef __signed__ int __s32;
+typedef unsigned int __u32;
 
 #ifdef __GNUC__
 __extension__ typedef __signed__ long long __s64;
+__extension__ typedef unsigned long long __u64;
 #else
 typedef __signed__ long long __s64;
+typedef unsigned long long __u64;
 #endif
 
 #endif /* _ASM_GENERIC_INT_LL64_H */
-- 
2.24.3 (Apple Git-128)




More information about the openwrt-devel mailing list