summaryrefslogtreecommitdiffstats
path: root/NetworkPkg
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:49:59 +0200
commit2f2a78f9d68c1a40d193bea8ddbdbe7e1b0c00c8 (patch)
treef2477e1de439b64cb936812e23aa9b27424badea /NetworkPkg
parentf6009a82389192e15700fd850d5a17276f7b5520 (diff)
downloadedk2-2f2a78f9d68c1a40d193bea8ddbdbe7e1b0c00c8.tar.gz
edk2-2f2a78f9d68c1a40d193bea8ddbdbe7e1b0c00c8.tar.bz2
edk2-2f2a78f9d68c1a40d193bea8ddbdbe7e1b0c00c8.zip
NetworkPkg/IpsecConfig: 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: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Diffstat (limited to 'NetworkPkg')
-rw-r--r--NetworkPkg/Application/IpsecConfig/IpSecConfig.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/NetworkPkg/Application/IpsecConfig/IpSecConfig.h b/NetworkPkg/Application/IpsecConfig/IpSecConfig.h
index 8ebc599a12..79a436a7b3 100644
--- a/NetworkPkg/Application/IpsecConfig/IpSecConfig.h
+++ b/NetworkPkg/Application/IpsecConfig/IpSecConfig.h
@@ -27,7 +27,9 @@
#include <Protocol/IpSecConfig.h>
+#ifndef ARRAY_SIZE
#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
+#endif
#define IPSECCONFIG_STATUS_NAME L"IpSecStatus"