From: Stephen Toub Date: Tue, 7 Feb 2023 22:47:28 +0000 (-0500) Subject: Fix two compilation constants for .NET 8 (#81775) X-Git-Tag: accepted/tizen/unified/riscv/20231226.055536~4175 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dce07a8216df463dfdbaa517d58e5d1930113190;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Fix two compilation constants for .NET 8 (#81775) --- diff --git a/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/Internal/NamespaceCache.cs b/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/Internal/NamespaceCache.cs index bafbb8f..6eddead 100644 --- a/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/Internal/NamespaceCache.cs +++ b/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/Internal/NamespaceCache.cs @@ -207,7 +207,7 @@ namespace System.Reflection.Metadata.Ecma335 { Debug.Assert(realChild.HasFullName); -#if NET8_OR_GREATER +#if NET8_0_OR_GREATER int numberOfSegments = fullName.AsSpan().Count('.'); #else int numberOfSegments = 0; diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Reader/JsonReaderHelper.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Reader/JsonReaderHelper.cs index 33ccb5d..03d89f9 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Reader/JsonReaderHelper.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Reader/JsonReaderHelper.cs @@ -20,7 +20,7 @@ namespace System.Text.Json { newLines = 1; data = data.Slice(0, lastLineFeedIndex); -#if NET8_OR_GREATER +#if NET8_0_OR_GREATER newLines += data.Count(JsonConstants.LineFeed); #else int pos;