kernel: fix portability issues on the x86 specific relocs host tool, fixes build...
[openwrt/openwrt.git] / target / linux / generic / patches-3.3 / 212-x86_reloc_portability.patch
1 --- a/arch/x86/tools/relocs.c
2 +++ b/arch/x86/tools/relocs.c
3 @@ -10,7 +10,18 @@
4 #define USE_BSD
5 #include <endian.h>
6 #include <regex.h>
7 -#include <tools/le_byteshift.h>
8 +
9 +static inline void __put_unaligned_le16(uint16_t val, uint8_t *p)
10 +{
11 + *p++ = val;
12 + *p++ = val >> 8;
13 +}
14 +
15 +static inline void put_unaligned_le32(uint32_t val, uint8_t *p)
16 +{
17 + __put_unaligned_le16(val >> 16, p + 2);
18 + __put_unaligned_le16(val, p);
19 +}
20
21 static void die(char *fmt, ...);
22