File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ module internal FSharp.Compiler.Lib
44
55open System.IO
66open System.Collections .Generic
7+ open System.Runtime .InteropServices
78open Internal.Utilities
89open FSharp.Compiler .AbstractIL .Internal
910open FSharp.Compiler .AbstractIL .Internal .Library
@@ -518,7 +519,7 @@ module UnmanagedProcessExecutionOptions =
518519 // Translation of C# from http://swikb/v1/DisplayOnlineDoc.aspx?entryID=826 and copy in bug://5018
519520 [<System.Security.Permissions.SecurityPermission( System.Security.Permissions.SecurityAction.Assert, UnmanagedCode = true ) >]
520521 let EnableHeapTerminationOnCorruption () =
521- if ( System.Environment.OSVersion.Version.Major >= 6 && // If OS is Vista or higher
522+ if ( RuntimeInformation.IsOSPlatform ( OSPlatform.Windows ) && System.Environment.OSVersion.Version.Major >= 6 && // If OS is Vista or higher
522523 System.Environment.Version.Major < 3 ) then // and CLR not 3.0 or higher
523524 // "The flag HeapSetInformation sets is available in Windows XP SP3 and later.
524525 // The data structure used for heap information is available on earlier versions of Windows.
@@ -547,4 +548,4 @@ module StackGuard =
547548
548549 let EnsureSufficientExecutionStack recursionDepth =
549550 if recursionDepth > MaxUncheckedRecursionDepth then
550- RuntimeHelpers.EnsureSufficientExecutionStack ()
551+ RuntimeHelpers.EnsureSufficientExecutionStack ()
You can’t perform that action at this time.
0 commit comments