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 --- a/tools/include/tools/be_byteshift.h
16 +++ b/tools/include/tools/be_byteshift.h
18 #ifndef _TOOLS_BE_BYTESHIFT_H
19 #define _TOOLS_BE_BYTESHIFT_H
22 +#include "linux_types.h"
27 static inline uint16_t __get_unaligned_be16(const uint8_t *p)
28 --- a/tools/include/tools/le_byteshift.h
29 +++ b/tools/include/tools/le_byteshift.h
31 #ifndef _TOOLS_LE_BYTESHIFT_H
32 #define _TOOLS_LE_BYTESHIFT_H
35 +#include "linux_types.h"
40 static inline uint16_t __get_unaligned_le16(const uint8_t *p)
42 +++ b/tools/include/tools/linux_types.h
44 +#ifndef __LINUX_TYPES_H
45 +#define __LINUX_TYPES_H
49 +typedef uint8_t __u8;
50 +typedef uint8_t __be8;
51 +typedef uint8_t __le8;
53 +typedef uint16_t __u16;
54 +typedef uint16_t __be16;
55 +typedef uint16_t __le16;
57 +typedef uint32_t __u32;
58 +typedef uint32_t __be32;
59 +typedef uint32_t __le32;
61 +typedef uint64_t __u64;
62 +typedef uint64_t __be64;
63 +typedef uint64_t __le64;