1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2025-04-21 12:27:27 +03:00

[tools] mtd-utils: do not rely on host kernel headers, redefine the integer types instead (#7950)

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23075 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
jow
2010-09-15 22:45:54 +00:00
parent 61f8be3569
commit c7af995072
2 changed files with 38 additions and 39 deletions

View File

@@ -42,13 +42,12 @@
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
--- a/include/mtd/ubi-media.h
+++ b/include/mtd/ubi-media.h
@@ -30,7 +30,15 @@
@@ -30,7 +30,13 @@
#ifndef __UBI_MEDIA_H__
#define __UBI_MEDIA_H__
+#ifdef __linux__
#include <asm/byteorder.h>
+#else
-#include <asm/byteorder.h>
+#if !defined(__u8) || !defined(__be16) || !defined(__be32) || !defined(__be64)
+#include <stdint.h>
+typedef uint8_t __u8;
+typedef uint16_t __be16;