naccyde / rpms / systemd

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