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