diff options
Diffstat (limited to 'src/lib/libcrypto/sha/sha_locl.h')
-rw-r--r-- | src/lib/libcrypto/sha/sha_locl.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/libcrypto/sha/sha_locl.h b/src/lib/libcrypto/sha/sha_locl.h index 6c6cd64282..1210176dda 100644 --- a/src/lib/libcrypto/sha/sha_locl.h +++ b/src/lib/libcrypto/sha/sha_locl.h | |||
@@ -202,6 +202,7 @@ fips_md_init_ctx(SHA1, SHA) | |||
202 | #endif | 202 | #endif |
203 | 203 | ||
204 | #if !defined(SHA_1) || !defined(SHA1_ASM) | 204 | #if !defined(SHA_1) || !defined(SHA1_ASM) |
205 | #include <machine/endian.h> | ||
205 | static void HASH_BLOCK_DATA_ORDER (SHA_CTX *c, const void *p, size_t num) | 206 | static void HASH_BLOCK_DATA_ORDER (SHA_CTX *c, const void *p, size_t num) |
206 | { | 207 | { |
207 | const unsigned char *data=p; | 208 | const unsigned char *data=p; |
@@ -221,9 +222,9 @@ static void HASH_BLOCK_DATA_ORDER (SHA_CTX *c, const void *p, size_t num) | |||
221 | 222 | ||
222 | for (;;) | 223 | for (;;) |
223 | { | 224 | { |
224 | const union { long one; char little; } is_endian = {1}; | ||
225 | 225 | ||
226 | if (!is_endian.little && sizeof(SHA_LONG)==4 && ((size_t)p%4)==0) | 226 | if (_BYTE_ORDER != _LITTLE_ENDIAN && |
227 | sizeof(SHA_LONG)==4 && ((size_t)p%4)==0) | ||
227 | { | 228 | { |
228 | const SHA_LONG *W=(const SHA_LONG *)data; | 229 | const SHA_LONG *W=(const SHA_LONG *)data; |
229 | 230 | ||