64ccc2
From 45670b65ccc1d41a32b83217ba9a78c9eed5fc02 Mon Sep 17 00:00:00 2001
15abaf
From: Lennart Poettering <lennart@poettering.net>
15abaf
Date: Thu, 23 Apr 2020 08:49:10 +0200
15abaf
Subject: [PATCH] acpi-fpdt: mark structures as packed
15abaf
15abaf
Let's make sure the alignment doesn't matter.
15abaf
15abaf
(cherry picked from commit 49490c1d353bc920cbf73f4c71e9c35d2e3eb8b1)
15abaf
64ccc2
Related: #2047373
15abaf
---
15abaf
 src/shared/acpi-fpdt.c | 8 ++++----
15abaf
 1 file changed, 4 insertions(+), 4 deletions(-)
15abaf
15abaf
diff --git a/src/shared/acpi-fpdt.c b/src/shared/acpi-fpdt.c
15abaf
index d565ebd43e..38c464c912 100644
15abaf
--- a/src/shared/acpi-fpdt.c
15abaf
+++ b/src/shared/acpi-fpdt.c
15abaf
@@ -23,7 +23,7 @@ struct acpi_table_header {
15abaf
         uint32_t oem_revision;
15abaf
         char asl_compiler_id[4];
15abaf
         uint32_t asl_compiler_revision;
15abaf
-};
15abaf
+} _packed_;
15abaf
 
15abaf
 enum {
15abaf
         ACPI_FPDT_TYPE_BOOT =   0,
15abaf
@@ -36,12 +36,12 @@ struct acpi_fpdt_header {
15abaf
         uint8_t revision;
15abaf
         uint8_t reserved[4];
15abaf
         uint64_t ptr;
15abaf
-};
15abaf
+} _packed_;
15abaf
 
15abaf
 struct acpi_fpdt_boot_header {
15abaf
         char signature[4];
15abaf
         uint32_t length;
15abaf
-};
15abaf
+} _packed_;
15abaf
 
15abaf
 enum {
15abaf
         ACPI_FPDT_S3PERF_RESUME_REC =   0,
15abaf
@@ -59,7 +59,7 @@ struct acpi_fpdt_boot {
15abaf
         uint64_t startup_start;
15abaf
         uint64_t exit_services_entry;
15abaf
         uint64_t exit_services_exit;
15abaf
-};
15abaf
+} _packed;
15abaf
 
15abaf
 int acpi_get_boot_usec(usec_t *loader_start, usec_t *loader_exit) {
15abaf
         _cleanup_free_ char *buf = NULL;