blob: 7ba8d16483a83601295228fb79e2748fa6c63674 (
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
|
Subject: [PATCH] Fix SHA_HTONL bug for arm 32be.
In arm 32be, there is no need to reverse the host value.
Upstream Status: Pending
Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
---
lib/freebl/sha_fast.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/nss/lib/freebl/sha_fast.h b/nss/lib/freebl/sha_fast.h
index 4f37d13..8072eda 100644
--- a/nss/lib/freebl/sha_fast.h
+++ b/nss/lib/freebl/sha_fast.h
@@ -99,6 +99,7 @@ swap4b(PRUint32 value)
defined(__ARM_ARCH_7__) || \
defined(__ARM_ARCH_7A__) || \
defined(__ARM_ARCH_7R__)))
+#if defined(IS_LITTLE_ENDIAN)
static __inline__ PRUint32
swap4b(PRUint32 value)
{
@@ -109,6 +110,7 @@ swap4b(PRUint32 value)
return ret;
}
#define SHA_HTONL(x) swap4b(x)
+#endif
#endif /* x86 family */
--
2.7.4
|