summaryrefslogtreecommitdiffstats
path: root/source/a/grub/0198-align-struct-efi_variable-better.patch
blob: 8ce8bdc82da7668d9989d1b4dddbc581e62d5e26 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From 2485633ada06c11c07a34a696a92b14e58f1e846 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Tue, 27 Feb 2018 13:55:35 -0500
Subject: [PATCH 198/250] align struct efi_variable better...

---
 include/grub/efiemu/runtime.h | 2 +-
 include/grub/types.h          | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/grub/efiemu/runtime.h b/include/grub/efiemu/runtime.h
index 9b6b729f4cc..856774a7c34 100644
--- a/include/grub/efiemu/runtime.h
+++ b/include/grub/efiemu/runtime.h
@@ -33,5 +33,5 @@ struct efi_variable
   grub_uint32_t namelen;
   grub_uint32_t size;
   grub_efi_uint32_t attributes;
-} GRUB_PACKED;
+} GRUB_PACKED GRUB_ALIGNED(8);
 #endif /* ! GRUB_EFI_EMU_RUNTIME_HEADER */
diff --git a/include/grub/types.h b/include/grub/types.h
index b93e4820194..f6a9723971d 100644
--- a/include/grub/types.h
+++ b/include/grub/types.h
@@ -29,6 +29,7 @@
 #else
 #define GRUB_PACKED __attribute__ ((packed))
 #endif
+#define GRUB_ALIGNED(x) __attribute__((aligned (x)))
 
 #ifdef GRUB_BUILD
 # define GRUB_CPU_SIZEOF_VOID_P	BUILD_SIZEOF_VOID_P
-- 
2.14.3