]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/PlatformBootManagerLib: guard the definition of ARRAY_SIZE
authorLaszlo Ersek <lersek@redhat.com>
Wed, 26 Oct 2016 12:14:47 +0000 (14:14 +0200)
committerLaszlo Ersek <lersek@redhat.com>
Thu, 27 Oct 2016 08:50:01 +0000 (10:50 +0200)
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>
OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c

index 29ce21282595acc8e38a82f6f12fc75661e437cc..16618a8f57f08636ba62ce5f68cbb8d0d8219092 100644 (file)
@@ -40,7 +40,9 @@ CONST UINT8 PciHostIrqs[] = {
 //\r
 // Array Size macro\r
 //\r
+#ifndef ARRAY_SIZE\r
 #define ARRAY_SIZE(array) (sizeof (array) / sizeof (array[0]))\r
+#endif\r
 \r
 //\r
 // Type definitions\r