diff options
author | Laszlo Ersek <lersek@redhat.com> | 2016-10-26 14:14:47 +0200 |
---|---|---|
committer | Laszlo Ersek <lersek@redhat.com> | 2016-10-27 10:50:01 +0200 |
commit | 103b12cec526e4fa6f709840fefc1d554387a170 (patch) | |
tree | a7d97cb44268034ba57c9a01e5248203d51c0b00 /OvmfPkg | |
parent | 2f2a78f9d68c1a40d193bea8ddbdbe7e1b0c00c8 (diff) | |
download | edk2-platforms-103b12cec526e4fa6f709840fefc1d554387a170.tar.xz |
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')
-rw-r--r-- | OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c | 2 |
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
|