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