summaryrefslogtreecommitdiff
path: root/target/linux/generic/patches-3.3/212-x86_reloc_portability.patch
blob: d0c8106a608303186bf7b6ef7b22eac6b9d561c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- a/arch/x86/tools/relocs.c
+++ b/arch/x86/tools/relocs.c
@@ -10,7 +10,18 @@
 #define USE_BSD
 #include <endian.h>
 #include <regex.h>
-#include <tools/le_byteshift.h>
+
+static inline void __put_unaligned_le16(uint16_t val, uint8_t *p)
+{
+	*p++ = val;
+	*p++ = val >> 8;
+}
+
+static inline void put_unaligned_le32(uint32_t val, uint8_t *p)
+{
+	__put_unaligned_le16(val >> 16, p + 2);
+	__put_unaligned_le16(val, p);
+}
 
 static void die(char *fmt, ...);