From: Yu Watanabe Date: Wed, 2 Jun 2021 06:36:26 +0000 (+0900) Subject: efi: do not use _STRING_ARCH_unaligned macro X-Git-Tag: v249-rc1~113^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=959ab90bbc08855ad5824efecbc03d37b3f9c982;p=thirdparty%2Fsystemd.git efi: do not use _STRING_ARCH_unaligned macro It is already removed from glibc. See, https://sourceware.org/git/?p=glibc.git;a=commit;h=16396c41deab45f715ffd813280d9d685b3b281e https://sourceware.org/git/?p=glibc.git;a=commit;h=09a596cc2cf4e0f9f8e9f3bba4b1a97efcb13bcb --- diff --git a/src/boot/efi/sha256.c b/src/boot/efi/sha256.c index 774f0eeb6c0..2108ea29c7a 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