aboutsummaryrefslogtreecommitdiff
path: root/crypt/sha256.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-07-02 13:03:53 -0400
committerUlrich Drepper <drepper@gmail.com>2011-07-02 13:03:53 -0400
commitfeea4948bca7e442edad3f995696f33450549e80 (patch)
treef0d06f3188f1179aa50dd5281234ed4167422db4 /crypt/sha256.h
parentfcfc776bc6242fdefde0efd7b0c315fbeca08555 (diff)
downloadglibc-feea4948bca7e442edad3f995696f33450549e80.tar
glibc-feea4948bca7e442edad3f995696f33450549e80.tar.gz
glibc-feea4948bca7e442edad3f995696f33450549e80.tar.bz2
glibc-feea4948bca7e442edad3f995696f33450549e80.zip
Fix last patch for big-endian machines
Diffstat (limited to 'crypt/sha256.h')
-rw-r--r--crypt/sha256.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/crypt/sha256.h b/crypt/sha256.h
index fcf61485de..0457bfae40 100644
--- a/crypt/sha256.h
+++ b/crypt/sha256.h
@@ -24,6 +24,7 @@
#include <limits.h>
#include <stdint.h>
#include <stdio.h>
+#include <endian.h>
/* Structure to save state of computation between the single steps. */
@@ -34,6 +35,8 @@ struct sha256_ctx
union
{
uint64_t total64;
+#define TOTAL64_low (1 - (BYTE_ORDER == LITTLE_ENDIAN))
+#define TOTAL64_high (BYTE_ORDER == LITTLE_ENDIAN)
uint32_t total[2];
};
uint32_t buflen;