From 2f2a78f9d68c1a40d193bea8ddbdbe7e1b0c00c8 Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Wed, 26 Oct 2016 14:14:47 +0200 Subject: [PATCH 1/1] 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 --- NetworkPkg/Application/IpsecConfig/IpSecConfig.h | 2 ++ 1 file changed, 2 insertions(+) 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" -- 2.39.2