Blame SOURCES/0057-align-struct-efi_variable-better.patch

5593c8
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
5593c8
From: Peter Jones <pjones@redhat.com>
5593c8
Date: Tue, 27 Feb 2018 13:55:35 -0500
5593c8
Subject: [PATCH] align struct efi_variable better...
5593c8
5593c8
---
5593c8
 include/grub/efiemu/runtime.h | 2 +-
5593c8
 include/grub/types.h          | 1 +
5593c8
 2 files changed, 2 insertions(+), 1 deletion(-)
5593c8
5593c8
diff --git a/include/grub/efiemu/runtime.h b/include/grub/efiemu/runtime.h
fd0330
index 36d2dedf47..9d93ba88ba 100644
5593c8
--- a/include/grub/efiemu/runtime.h
5593c8
+++ b/include/grub/efiemu/runtime.h
5593c8
@@ -33,5 +33,5 @@ struct efi_variable
5593c8
   grub_uint32_t namelen;
5593c8
   grub_uint32_t size;
5593c8
   grub_efi_uint32_t attributes;
5593c8
-} GRUB_PACKED;
5593c8
+} GRUB_PACKED GRUB_ALIGNED(8);
5593c8
 #endif /* ! GRUB_EFI_EMU_RUNTIME_HEADER */
5593c8
diff --git a/include/grub/types.h b/include/grub/types.h
fd0330
index 0a3ff15913..ba446d9904 100644
5593c8
--- a/include/grub/types.h
5593c8
+++ b/include/grub/types.h
5593c8
@@ -29,6 +29,7 @@
5593c8
 #else
5593c8
 #define GRUB_PACKED __attribute__ ((packed))
5593c8
 #endif
5593c8
+#define GRUB_ALIGNED(x) __attribute__((aligned (x)))
5593c8
 
5593c8
 #ifdef GRUB_BUILD
5593c8
 # define GRUB_CPU_SIZEOF_VOID_P	BUILD_SIZEOF_VOID_P