Vlv2TbltDevicePkg/AcpiPlatform: Amend the declaration of mGlobalNvsArea
mGlobalNvsArea wasn't declared as extern in AcpiPlatform.h and the header was included in AcpiPlatform.c and AcpiPlatformHooks.c. Although it's declared as extern in AcpiPlatformHooks.c, gcc still created an instance of mGlobalNvsArea in AcpiPlatformHooks.c since the header was expanded first and then the linker complained "multiple definition". This commit rearrange the delaration of mGlobalNvsArea to satisfy gcc. Cc: David Wei <david.wei@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gary Lin <glin@suse.com> Reviewed-by: David Wei <david.wei@intel.com>
This commit is contained in:
@@ -67,6 +67,7 @@ CHAR16 gACPIOSFRRefDataBlockVariableName[] = ACPI_OSFR_REF_DATA_BLOCK_VARIABL
|
||||
CHAR16 gACPIOSFRMfgStringVariableName[] = ACPI_OSFR_MFG_STRING_VARIABLE_NAME;
|
||||
|
||||
EFI_CPU_IO_PROTOCOL *mCpuIo;
|
||||
EFI_GLOBAL_NVS_AREA_PROTOCOL mGlobalNvsArea;
|
||||
#ifndef __GNUC__
|
||||
#pragma optimize("", off)
|
||||
#endif
|
||||
|
@@ -59,7 +59,7 @@ Abstract:
|
||||
#include <IndustryStandard/Acpi20.h>
|
||||
#include <Library/HobLib.h>
|
||||
#include <AlertStandardFormatTable.h>
|
||||
#include <Guid/SetupVariable.h>
|
||||
#include <Guid/SetupVariable.h>
|
||||
#include <Protocol/GlobalNvsArea.h>
|
||||
#include <Library/BaseMemoryLib.h>
|
||||
#include <Library/MemoryAllocationLib.h>
|
||||
|
@@ -33,7 +33,6 @@ Abstract:
|
||||
//
|
||||
// Statements that include other files.
|
||||
//
|
||||
#include "AcpiPlatform.h"
|
||||
#include "AcpiPlatform.h"
|
||||
#include "AcpiPlatformHooks.h"
|
||||
#include "Platform.h"
|
||||
|
Reference in New Issue
Block a user