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:04 +0200 |
commit | e101ddcf59917a6c2bafdf56e7293f3722c4a27d (patch) | |
tree | b57d093e2a4a025d7c676ebc247bdadcf8f295e3 /OvmfPkg | |
parent | 103b12cec526e4fa6f709840fefc1d554387a170 (diff) | |
download | edk2-platforms-e101ddcf59917a6c2bafdf56e7293f3722c4a27d.tar.xz |
OvmfPkg/XenBusDxe: 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: Gary Lin <glin@suse.com>
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: Gary Lin <glin@suse.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Diffstat (limited to 'OvmfPkg')
-rw-r--r-- | OvmfPkg/XenBusDxe/XenStore.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/OvmfPkg/XenBusDxe/XenStore.c b/OvmfPkg/XenBusDxe/XenStore.c index b7ae1d0486..9eeb6f54fb 100644 --- a/OvmfPkg/XenBusDxe/XenStore.c +++ b/OvmfPkg/XenBusDxe/XenStore.c @@ -713,7 +713,9 @@ static XenStoreErrors gXenStoreErrors[] = { { XENSTORE_STATUS_EISCONN, "EISCONN" },
{ XENSTORE_STATUS_E2BIG, "E2BIG" }
};
+#ifndef ARRAY_SIZE
#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
+#endif
STATIC
XENSTORE_STATUS
|