blob: 1e385210ce5bc8df681028fe51b13b1d4d40a4cf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
From b115cc238a4433e0b29d97392e4251b689aff311 Mon Sep 17 00:00:00 2001
From: Carlo Landmeter <clandmeter@gmail.com>
Date: Thu, 16 Jan 2014 12:26:50 +0000
Subject: [PATCH] uclibc already defines bswap
---
src/common/bswap.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/common/bswap.h b/src/common/bswap.h
index f1cf28a..c59a5a2 100644
--- a/src/common/bswap.h
+++ b/src/common/bswap.h
@@ -16,11 +16,14 @@
#include "common/common_pch.h"
+#ifndef bswap_16
inline uint16_t
bswap_16(uint16_t x) {
return (x >> 8) | (x << 8);
}
+#endif
+#ifndef bswap_32
inline uint32_t
bswap_32(uint32_t x) {
x = ((x << 8) & 0xff00ff00) | ((x >> 8) & 0x00ff00ff);
@@ -28,7 +31,9 @@ bswap_32(uint32_t x) {
return x;
}
+#endif
+#ifndef bswap_64
inline uint64_t
bswap_64(uint64_t x) {
union {
@@ -42,5 +47,6 @@ bswap_64(uint64_t x) {
return r.ll;
}
+#endif
#endif // MTX_COMMON_BSWAP_H
--
1.8.5.2
|