aboutsummaryrefslogtreecommitdiffstats
path: root/tools/mkimage/patches/060-remove_kernel_includes.patch
blob: 8917ec0863e92fa2568419521cf979f1bd92ba8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
The Kernel includes are only available on Linux hosts, remove then on
non Linux hosts. 

--- a/include/linux/posix_types.h
+++ b/include/linux/posix_types.h
@@ -43,6 +43,8 @@ typedef void (*__kernel_sighandler_t)(in
 /* Type of a SYSV IPC key.  */
 typedef int __kernel_key_t;
 
+#ifdef linux
 #include <asm/posix_types.h>
+#endif
 
 #endif /* _LINUX_POSIX_TYPES_H */
--- a/include/imx8image.h
+++ b/include/imx8image.h
@@ -11,7 +11,12 @@
 #include <image.h>
 #include <inttypes.h>
 #include "imagetool.h"
+#ifdef linux
 #include "linux/kernel.h"
+#else
+#define ALIGN(x,a)		__ALIGN_MASK((x),(typeof(x))(a)-1)
+#define __ALIGN_MASK(x,mask)	(((x)+(mask))&~(mask))
+#endif
 
 #define __packed   __attribute__((packed))