From: Laszlo Ersek Date: Wed, 26 Oct 2016 12:14:47 +0000 (+0200) Subject: NetworkPkg/IpsecConfig: guard the definition of ARRAY_SIZE X-Git-Tag: edk2-stable201903~5480 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=2f2a78f9d68c1a40d193bea8ddbdbe7e1b0c00c8;hp=f6009a82389192e15700fd850d5a17276f7b5520 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 Cc: Siyuan Fu Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek Reviewed-by: Fu Siyuan Reviewed-by: Wu Jiaxin Reviewed-by: Jordan Justen --- 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 +#ifndef ARRAY_SIZE #define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0])) +#endif #define IPSECCONFIG_STATUS_NAME L"IpSecStatus"