Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Fixes tools/include/tools/be_byteshift.h:4:10: fatal error: linux/types.h: No such file or directory. Original idea from pmaports/device/testing/linux-huawei-alice/01_fix_types_include.patch. linux_types.h from https://github.com/DarkJoker360/android_kernel_huawei_alice/blob/cm-14.1/tools/include/tools/linux_types.h
- ---
- diff --git a/tools/include/tools/be_byteshift.h b/tools/include/tools/be_byteshift.h
- index f4912e26..cd041f3d 100644
- --- a/tools/include/tools/be_byteshift.h
- +++ b/tools/include/tools/be_byteshift.h
- @@ -1,7 +1,7 @@
- #ifndef _TOOLS_BE_BYTESHIFT_H
- #define _TOOLS_BE_BYTESHIFT_H
- -#include <linux/types.h>
- +#include "linux_types.h"
- static inline __u16 __get_unaligned_be16(const __u8 *p)
- {
- diff --git a/tools/include/tools/le_byteshift.h b/tools/include/tools/le_byteshift.h
- index c99d45a6..94d8d2e2 100644
- --- a/tools/include/tools/le_byteshift.h
- +++ b/tools/include/tools/le_byteshift.h
- @@ -1,7 +1,7 @@
- #ifndef _TOOLS_LE_BYTESHIFT_H
- #define _TOOLS_LE_BYTESHIFT_H
- -#include <linux/types.h>
- +#include "linux_types.h"
- static inline __u16 __get_unaligned_le16(const __u8 *p)
- {
- diff --git a/tools/include/tools/linux_types.h b/tools/include/tools/linux_types.h
- new file mode 100644
- index 00000000..f07ef829
- --- /dev/null
- +++ b/tools/include/tools/linux_types.h
- @@ -0,0 +1,22 @@
- +#ifndef __LINUX_TYPES_H
- +#define __LINUX_TYPES_H
- +
- +#include <stdint.h>
- +
- +typedef uint8_t __u8;
- +typedef uint8_t __be8;
- +typedef uint8_t __le8;
- +
- +typedef uint16_t __u16;
- +typedef uint16_t __be16;
- +typedef uint16_t __le16;
- +
- +typedef uint32_t __u32;
- +typedef uint32_t __be32;
- +typedef uint32_t __le32;
- +
- +typedef uint64_t __u64;
- +typedef uint64_t __be64;
- +typedef uint64_t __le64;
- +
- +#endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement