summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/Library
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2016-10-26 14:14:47 +0200
committerLaszlo Ersek <lersek@redhat.com>2016-10-27 10:50:01 +0200
commit103b12cec526e4fa6f709840fefc1d554387a170 (patch)
treea7d97cb44268034ba57c9a01e5248203d51c0b00 /OvmfPkg/Library
parent2f2a78f9d68c1a40d193bea8ddbdbe7e1b0c00c8 (diff)
downloadedk2-103b12cec526e4fa6f709840fefc1d554387a170.tar.gz
edk2-103b12cec526e4fa6f709840fefc1d554387a170.tar.bz2
edk2-103b12cec526e4fa6f709840fefc1d554387a170.zip
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 <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Diffstat (limited to 'OvmfPkg/Library')
-rw-r--r--OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c2
1 files changed, 2 insertions, 0 deletions
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