060-remove_kernel_includes.patch 719 B

1234567891011121314151617181920212223242526272829
  1. The Kernel includes are only available on Linux hosts, remove then on
  2. non Linux hosts.
  3. --- a/include/linux/posix_types.h
  4. +++ b/include/linux/posix_types.h
  5. @@ -43,6 +43,8 @@ typedef void (*__kernel_sighandler_t)(in
  6. /* Type of a SYSV IPC key. */
  7. typedef int __kernel_key_t;
  8. +#ifdef linux
  9. #include <asm/posix_types.h>
  10. +#endif
  11. #endif /* _LINUX_POSIX_TYPES_H */
  12. --- a/include/imx8image.h
  13. +++ b/include/imx8image.h
  14. @@ -11,7 +11,12 @@
  15. #include <image.h>
  16. #include <inttypes.h>
  17. #include "imagetool.h"
  18. +#ifdef linux
  19. #include "linux/kernel.h"
  20. +#else
  21. +#define ALIGN(x,a) __ALIGN_MASK((x),(typeof(x))(a)-1)
  22. +#define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask))
  23. +#endif
  24. #define __packed __attribute__((packed))