From 103b12cec526e4fa6f709840fefc1d554387a170 Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Wed, 26 Oct 2016 14:14:47 +0200 Subject: [PATCH] OvmfPkg/PlatformBootManagerLib: guard the definition of ARRAY_SIZE In one of the next patches, we'll introduce ARRAY_SIZE in "MdePkg/Include/Base.h". In order to proceed in small steps, make the module-local definition of ARRAY_SIZE conditional. This way the introduction of the macro under MdePkg will silently switch this module over (after which we can remove the module-local definition completely). Cc: Jordan Justen Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek Reviewed-by: Jordan Justen --- OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c index 29ce212825..16618a8f57 100644 --- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c +++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c @@ -40,7 +40,9 @@ CONST UINT8 PciHostIrqs[] = { // // Array Size macro // +#ifndef ARRAY_SIZE #define ARRAY_SIZE(array) (sizeof (array) / sizeof (array[0])) +#endif // // Type definitions -- 2.39.2