X Tutup
Skip to content

Commit 49490c1

Browse files
committed
acpi-fpdt: mark structures as packed
Let's make sure the alignment doesn't matter.
1 parent 0cd4175 commit 49490c1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/shared/acpi-fpdt.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ struct acpi_table_header {
2323
uint32_t oem_revision;
2424
char asl_compiler_id[4];
2525
uint32_t asl_compiler_revision;
26-
};
26+
} _packed_;
2727

2828
enum {
2929
ACPI_FPDT_TYPE_BOOT = 0,
@@ -36,12 +36,12 @@ struct acpi_fpdt_header {
3636
uint8_t revision;
3737
uint8_t reserved[4];
3838
uint64_t ptr;
39-
};
39+
} _packed_;
4040

4141
struct acpi_fpdt_boot_header {
4242
char signature[4];
4343
uint32_t length;
44-
};
44+
} _packed_;
4545

4646
enum {
4747
ACPI_FPDT_S3PERF_RESUME_REC = 0,
@@ -59,7 +59,7 @@ struct acpi_fpdt_boot {
5959
uint64_t startup_start;
6060
uint64_t exit_services_entry;
6161
uint64_t exit_services_exit;
62-
};
62+
} _packed;
6363

6464
int acpi_get_boot_usec(usec_t *loader_start, usec_t *loader_exit) {
6565
_cleanup_free_ char *buf = NULL;

0 commit comments

Comments
 (0)
X Tutup