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