richardphibel / rpms / systemd

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