1 From 48232d3d931c95953ce2ddfe7da7bb164aef6a73 Mon Sep 17 00:00:00 2001
2 From: Felix Fietkau <nbd@nbd.name>
3 Date: Fri, 7 Jul 2017 17:03:16 +0200
4 Subject: linux-3.6: fix portability of some includes files in tools/ used on the host
6 lede-commit: 6040b1d29ab1f047c5e49b748abcb6a3196add28
7 Signed-off-by: Felix Fietkau <nbd@nbd.name>
9 tools/include/tools/be_byteshift.h | 4 ++++
10 tools/include/tools/le_byteshift.h | 4 ++++
11 tools/include/tools/linux_types.h | 22 ++++++++++++++++++++++
12 3 files changed, 30 insertions(+)
13 create mode 100644 tools/include/tools/linux_types.h
15 diff --git a/tools/include/tools/be_byteshift.h b/tools/include/tools/be_byteshift.h
16 index 84c17d836578..ed9932e97bd4 100644
17 --- a/tools/include/tools/be_byteshift.h
18 +++ b/tools/include/tools/be_byteshift.h
20 #ifndef _TOOLS_BE_BYTESHIFT_H
21 #define _TOOLS_BE_BYTESHIFT_H
24 +#include "linux_types.h"
29 static inline uint16_t __get_unaligned_be16(const uint8_t *p)
30 diff --git a/tools/include/tools/le_byteshift.h b/tools/include/tools/le_byteshift.h
31 index 8fe9f2488ec7..2e387b5226d9 100644
32 --- a/tools/include/tools/le_byteshift.h
33 +++ b/tools/include/tools/le_byteshift.h
35 #ifndef _TOOLS_LE_BYTESHIFT_H
36 #define _TOOLS_LE_BYTESHIFT_H
39 +#include "linux_types.h"
44 static inline uint16_t __get_unaligned_le16(const uint8_t *p)
45 diff --git a/tools/include/tools/linux_types.h b/tools/include/tools/linux_types.h
47 index 000000000000..f07ef8293ebc
49 +++ b/tools/include/tools/linux_types.h
51 +#ifndef __LINUX_TYPES_H
52 +#define __LINUX_TYPES_H
56 +typedef uint8_t __u8;
57 +typedef uint8_t __be8;
58 +typedef uint8_t __le8;
60 +typedef uint16_t __u16;
61 +typedef uint16_t __be16;
62 +typedef uint16_t __le16;
64 +typedef uint32_t __u32;
65 +typedef uint32_t __be32;
66 +typedef uint32_t __le32;
68 +typedef uint64_t __u64;
69 +typedef uint64_t __be64;
70 +typedef uint64_t __le64;