[PATCH 06/18] scripts: don't depend on system <asm/types.h>

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If we compile on non-Linux hosts, we can't assume this header to be
available. Thus typedef loff_t and [su](8|16|32|64) ourselves.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 scripts/include/linux/types.h | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/scripts/include/linux/types.h b/scripts/include/linux/types.h
index 8ebf6278b2ef..e81d7e810126 100644
--- a/scripts/include/linux/types.h
+++ b/scripts/include/linux/types.h
@@ -5,8 +5,18 @@
 #include <stddef.h>
 #include <stdint.h>
 
-#define __SANE_USERSPACE_TYPES__	/* For PPC64, to get LL64 types */
-#include <asm/types.h>
+typedef uint64_t __u64;
+typedef int64_t __s64;
+typedef uint32_t __u32;
+typedef int32_t __s32;
+typedef uint16_t __u16;
+typedef int16_t __s16;
+typedef uint8_t __u8;
+typedef int8_t __s8;
+
+#ifndef __linux__
+typedef long long loff_t;
+#endif
 
 struct page;
 struct kmem_cache;
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux