aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2013-08-13 15:10:19 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2013-11-28 13:19:07 +0200
commitd5018868fc30d7406e0b568c45a79d498b8e0bca (patch)
tree19226266718a7916e903dd252911fb109380eaad /lib
parente817336f0824225838b6ff447760a1679f2d4e66 (diff)
downloadeclat-d5018868fc30d7406e0b568c45a79d498b8e0bca.tar.gz
eclat-d5018868fc30d7406e0b568c45a79d498b8e0bca.tar.bz2
Do not depend on alignof.h
Diffstat (limited to 'lib')
-rw-r--r--lib/sha256.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sha256.c b/lib/sha256.c
index 4b2cee3..bcb5f74 100644
--- a/lib/sha256.c
+++ b/lib/sha256.c
@@ -24,7 +24,7 @@
#include "sha256.h"
-#include <stdalign.h>
+#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
@@ -374,6 +374,7 @@ sha256_process_bytes (const void *buffer, size_t len, struct sha256_ctx *ctx)
if (len >= 64)
{
#if !_STRING_ARCH_unaligned
+# define alignof(type) offsetof (struct { char c; type x; }, x)
# define UNALIGNED_P(p) ((uintptr_t) (p) % alignof (uint32_t) != 0)
if (UNALIGNED_P (buffer))
while (len > 64)

Return to:

Send suggestions and report system problems to the System administrator.