diff options
author | Robert Moore <Robert.Moore@intel.com> | 2023-02-07 10:55:48 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-07 10:55:48 -0800 |
commit | af2bdabeec7d9233f8d0529e509dd72701034291 (patch) | |
tree | 75353567a87ca87fbb3098a24d1107bf0f223d6d | |
parent | 2affe5b3d3cef99a4842f88c9536683f22dbb0db (diff) | |
parent | 6dd672d3425a72b4ee5d758a806614663d5d09a0 (diff) | |
download | acpica-af2bdabeec7d9233f8d0529e509dd72701034291.tar.gz |
Merge pull request #837 from acpica/revert-813-flex-array
Revert "Replace fake flexible arrays with actual flexible array members"
-rw-r--r-- | source/include/acrestyp.h | 8 | ||||
-rw-r--r-- | source/include/actbl2.h | 2 | ||||
-rw-r--r-- | source/include/platform/acenv.h | 11 |
3 files changed, 4 insertions, 17 deletions
diff --git a/source/include/acrestyp.h b/source/include/acrestyp.h index f48ae7614..a8299fbc0 100644 --- a/source/include/acrestyp.h +++ b/source/include/acrestyp.h @@ -538,7 +538,7 @@ typedef struct acpi_resource_extended_irq UINT8 WakeCapable; UINT8 InterruptCount; ACPI_RESOURCE_SOURCE ResourceSource; - UINT32 Interrupts[]; + UINT32 Interrupts[1]; } ACPI_RESOURCE_EXTENDED_IRQ; @@ -927,10 +927,8 @@ typedef struct acpi_pci_routing_table UINT32 Pin; UINT64 Address; /* here for 64-bit alignment */ UINT32 SourceIndex; - union { - char Pad[4]; /* pad to 64 bits so sizeof() works in all cases */ - ACPI_FLEX_ARRAY(char, Source); - }; + char Source[4]; /* pad to 64 bits so sizeof() works in all cases */ + } ACPI_PCI_ROUTING_TABLE; #endif /* __ACRESTYP_H__ */ diff --git a/source/include/actbl2.h b/source/include/actbl2.h index ec71be075..1662cfe20 100644 --- a/source/include/actbl2.h +++ b/source/include/actbl2.h @@ -1552,7 +1552,7 @@ enum AcpiMadtLpcPicVersion { typedef struct acpi_madt_oem_data { - ACPI_FLEX_ARRAY(UINT8, OemData); + UINT8 OemData[]; } ACPI_MADT_OEM_DATA; diff --git a/source/include/platform/acenv.h b/source/include/platform/acenv.h index 4867eb02f..a08311ddc 100644 --- a/source/include/platform/acenv.h +++ b/source/include/platform/acenv.h @@ -419,17 +419,6 @@ #endif /* - * Flexible array members are not allowed to be part of a union under - * C99, but this is not for any technical reason. Work around the - * limitation. - */ -#define ACPI_FLEX_ARRAY(TYPE, NAME) \ - struct { \ - struct { } __Empty_ ## NAME; \ - TYPE NAME[]; \ - } - -/* * Configurable calling conventions: * * ACPI_SYSTEM_XFACE - Interfaces to host OS (handlers, threads) |