libbb/sha: #undef macro names before #defining them.
authorDenys Vlasenko <vda.linux@googlemail.com>
Sun, 5 Jul 2009 18:34:38 +0000 (20:34 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sun, 5 Jul 2009 18:34:38 +0000 (20:34 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
libbb/sha1.c

index 9fa095e8573879634656f0d7154c37acd39d5a4b..ea645b735060e0d498550506543a1d2693d8e25e 100644 (file)
@@ -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;