From ca42af4397188dddf39cec634d7467c50a0aa2e6 Mon Sep 17 00:00:00 2001 From: ami-GS <1991.daiki@gmail.com> Date: Tue, 19 Nov 2024 16:04:53 -0800 Subject: [PATCH] assemble definition in same ifdef --- src/platform/platform_internal.h | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/platform/platform_internal.h b/src/platform/platform_internal.h index 8782710521..11d064fc4a 100644 --- a/src/platform/platform_internal.h +++ b/src/platform/platform_internal.h @@ -165,15 +165,6 @@ typedef enum CXPLAT_SOCKET_TYPE { #define DatapathType(SendData) ((CXPLAT_SEND_DATA_COMMON*)(SendData))->DatapathType -#ifdef _WIN32 - -#define IS_LOOPBACK(Address) ((Address.si_family == QUIC_ADDRESS_FAMILY_INET && \ - IN4_IS_ADDR_LOOPBACK(&Address.Ipv4.sin_addr)) || \ - (Address.si_family == QUIC_ADDRESS_FAMILY_INET6 && \ - IN6_IS_ADDR_LOOPBACK(&Address.Ipv6.sin6_addr))) - -#endif - #ifdef _KERNEL_MODE #define CXPLAT_BASE_REG_PATH L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\MsQuic\\Parameters\\" @@ -774,7 +765,12 @@ CxPlatConvertFromMappedV6( } #pragma warning(pop) -#endif +#define IS_LOOPBACK(Address) ((Address.si_family == QUIC_ADDRESS_FAMILY_INET && \ + IN4_IS_ADDR_LOOPBACK(&Address.Ipv4.sin_addr)) || \ + (Address.si_family == QUIC_ADDRESS_FAMILY_INET6 && \ + IN6_IS_ADDR_LOOPBACK(&Address.Ipv6.sin6_addr))) + +#endif // _WIN32 // // Crypt Initialization