diff --git a/src/boot/efi/sha256.c b/src/boot/efi/sha256.c index 774f0eeb6c..2108ea29c7 100644 --- a/src/boot/efi/sha256.c +++ b/src/boot/efi/sha256.c @@ -143,9 +143,12 @@ void sha256_process_bytes(const void *buffer, UINTN len, struct sha256_ctx *ctx) /* Process available complete blocks. */ if (len >= 64) { -#if !_STRING_ARCH_unaligned -/* To check alignment gcc has an appropriate operator. Other - compilers don't. */ + +/* The condition below is from glibc's string/string-inline.c. + * See definition of _STRING_INLINE_unaligned. */ +#if !defined(__mc68020__) && !defined(__s390__) && !defined(__i386__) + +/* To check alignment gcc has an appropriate operator. Other compilers don't. */ # if __GNUC__ >= 2 # define UNALIGNED_P(p) (((UINTN) p) % __alignof__ (UINT32) != 0) # else