Skip to content

Commit

Permalink
Clib: Fix build issues when ACPI_USE_STANDARD_HEADERS is not defined …
Browse files Browse the repository at this point in the history
…by converting size_t to ACPI_SIZE

When standard size_t is not defined due to ACPI_USE_STANDARD_HEADERS=n,
we shouldn't use size_t, but should use ACPI_SIZE instead. This fixes such
build issue. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
  • Loading branch information
Lv Zheng committed Jul 22, 2016
1 parent 56920e2 commit 7cf4111
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions source/common/acfileio.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ AcGetOneTableFromFile (

/* Allocate a buffer for the entire table */

Table = AcpiOsAllocate ((size_t) TableHeader.Length);
Table = AcpiOsAllocate ((ACPI_SIZE) TableHeader.Length);
if (!Table)
{
return (AE_NO_MEMORY);
Expand Down Expand Up @@ -460,7 +460,7 @@ AcValidateTableHeader (
long TableOffset)
{
ACPI_TABLE_HEADER TableHeader;
size_t Actual;
ACPI_SIZE Actual;
long OriginalOffset;
UINT32 FileSize;
UINT32 i;
Expand Down
4 changes: 2 additions & 2 deletions source/tools/acpidump/apfiles.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ ApWriteToBinaryFile (
char Filename[ACPI_NAME_SIZE + 16];
char InstanceStr [16];
ACPI_FILE File;
size_t Actual;
ACPI_SIZE Actual;
UINT32 TableLength;


Expand Down Expand Up @@ -311,7 +311,7 @@ ApGetTableFromFile (
ACPI_TABLE_HEADER *Buffer = NULL;
ACPI_FILE File;
UINT32 FileSize;
size_t Actual;
ACPI_SIZE Actual;


/* Must use binary mode */
Expand Down

0 comments on commit 7cf4111

Please sign in to comment.