Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit efff1eb

Browse files
committed
Update Interop.PlatformDetection.cs with FreeBSD
It's needed to avoid breaking tests for FreeBSD in one place where we do runtime detection to determine the right value to pass to sysconf to get the current page size.
1 parent e382c23 commit efff1eb

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/Common/src/Interop/Interop.PlatformDetection.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ internal enum OperatingSystem
1313
{
1414
Windows,
1515
Linux,
16-
OSX
16+
OSX,
17+
FreeBSD
1718
}
1819

1920
internal static bool IsWindows
@@ -31,6 +32,11 @@ internal static bool IsOSX
3132
get { return OperatingSystem.OSX == PlatformDetection.OperatingSystem; }
3233
}
3334

35+
internal static bool IsFreeBSD
36+
{
37+
get { return OperatingSystem.FreeBSD == PlatformDetection.OperatingSystem; }
38+
}
39+
3440
internal static class PlatformDetection
3541
{
3642
internal static OperatingSystem OperatingSystem { get { return s_os.Value; } }
@@ -48,6 +54,8 @@ internal static class PlatformDetection
4854
{
4955
case "Darwin":
5056
return OperatingSystem.OSX;
57+
case "FreeBSD":
58+
return OperatingSystem.FreeBSD;
5159
default:
5260
return OperatingSystem.Linux;
5361
}

0 commit comments

Comments
 (0)