tools: mkimage: fix __u64 typedef conflict with new glibc
[openwrt/openwrt.git] / tools / mkimage / patches / 060-remove_kernel_includes.patch
1 --- a/include/compiler.h
2 +++ b/include/compiler.h
3 @@ -66,6 +66,10 @@ typedef uint8_t __u8;
4 typedef uint16_t __u16;
5 typedef uint32_t __u32;
6 typedef unsigned int uint;
7 +#ifndef linux
8 +typedef int __kernel_daddr_t;
9 +typedef unsigned int __kernel_ino_t;
10 +#endif
11
12 #define uswap_16(x) \
13 ((((x) & 0xff00) >> 8) | \
14 --- a/include/linux/posix_types.h
15 +++ b/include/linux/posix_types.h
16 @@ -43,6 +43,8 @@ typedef void (*__kernel_sighandler_t)(in
17 /* Type of a SYSV IPC key. */
18 typedef int __kernel_key_t;
19
20 +#ifdef linux
21 #include <asm/posix_types.h>
22 +#endif
23
24 #endif /* _LINUX_POSIX_TYPES_H */
25 --- a/include/linux/types.h
26 +++ b/include/linux/types.h
27 @@ -2,7 +2,6 @@
28 #define _LINUX_TYPES_H
29
30 #include <linux/posix_types.h>
31 -#include <asm/types.h>
32 #include <stdbool.h>
33
34 #ifndef __KERNEL_STRICT_NAMES