]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
efi: do not use _STRING_ARCH_unaligned macro
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 2 Jun 2021 06:36:26 +0000 (15:36 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 2 Jun 2021 06:36:29 +0000 (15:36 +0900)
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

src/boot/efi/sha256.c

index 774f0eeb6c0e658495c40d7e4ad4bd7bbb4e485f..2108ea29c7ac234a0788533a07c8d23826c54852 100644 (file)
@@ -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