summaryrefslogtreecommitdiff
path: root/libbb/sha1.c
diff options
context:
space:
mode:
authorDenys Vlasenko2009-07-05 20:34:38 +0200
committerDenys Vlasenko2009-07-05 20:34:38 +0200
commitfe4ef36bcd660598cac4bdb5f428b3f0bdbc3fa3 (patch)
treeb236e380f19b424c11e9b818f8618a3715b1ccde /libbb/sha1.c
parent6f58be07485fd2fbac1b828e5f2c631e7d5bc9e4 (diff)
downloadbusybox-fe4ef36bcd660598cac4bdb5f428b3f0bdbc3fa3.zip
busybox-fe4ef36bcd660598cac4bdb5f428b3f0bdbc3fa3.tar.gz
libbb/sha: #undef macro names before #defining them.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb/sha1.c')
-rw-r--r--libbb/sha1.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/libbb/sha1.c b/libbb/sha1.c
index 9fa095e..ea645b7 100644
--- a/libbb/sha1.c
+++ b/libbb/sha1.c
@@ -53,6 +53,12 @@ static inline uint64_t hton64(uint64_t v)
#endif
+/* Some arch headers have conflicting defines */
+#undef ch
+#undef parity
+#undef maj
+#undef rnd
+
static void FAST_FUNC sha1_process_block64(sha1_ctx_t *ctx)
{
unsigned t;
@@ -162,6 +168,13 @@ static const uint64_t sha_K[80] = {
0x5fcb6fab3ad6faecULL, 0x6c44198c4a475817ULL
};
+#undef Ch
+#undef Maj
+#undef S0
+#undef S1
+#undef R0
+#undef R1
+
static void FAST_FUNC sha256_process_block64(sha256_ctx_t *ctx)
{
unsigned t;