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