util: Fix SHA1 implementation on big endian
[mesa.git] / src / util / sha1 / sha1.c
index ef59ea1dfc61bc463b700901b295545fb4c104a8..f36a77c2026e239ee9b964fd80c094e6c556ef7b 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <stdint.h>
 #include <string.h>
+#include "u_endian.h"
 #include "sha1.h"
 
 #define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits))))
@@ -24,7 +25,7 @@
  * blk0() and blk() perform the initial expand.
  * I got the idea of expanding during the round function from SSLeay
  */
-#if BYTE_ORDER == LITTLE_ENDIAN
+#ifdef PIPE_ARCH_LITTLE_ENDIAN
 # define blk0(i) (block->l[i] = (rol(block->l[i],24)&0xFF00FF00) \
     |(rol(block->l[i],8)&0x00FF00FF))
 #else