dcavalca / rpms / grub2

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