From 3de099349d44219d603f8b027d95a08f9e372336 Mon Sep 17 00:00:00 2001 From: Ploo <239304139+xinitrcn1@users.noreply.github.com> Date: Sun, 28 Dec 2025 07:55:48 +0000 Subject: [PATCH 1/2] Add OSPlatform.FreeBSD --- LibGit2Sharp/Core/NativeMethods.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LibGit2Sharp/Core/NativeMethods.cs b/LibGit2Sharp/Core/NativeMethods.cs index cbb850b16..3c8b6ac80 100644 --- a/LibGit2Sharp/Core/NativeMethods.cs +++ b/LibGit2Sharp/Core/NativeMethods.cs @@ -100,7 +100,7 @@ private static IntPtr ResolveDll(string libraryName, Assembly assembly, DllImpor // We carry a number of .so files for Linux which are linked against various // libc/OpenSSL libraries. Try them out. - if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) || RuntimeInformation.IsOSPlatform(OSPlatform.FreeBSD)) { // The libraries are located at 'runtimes//native/lib{libraryName}.so' // The ends with the processor architecture. e.g. fedora-x64. From eb679ae3d25c175f5e179ca7383609426b4864a6 Mon Sep 17 00:00:00 2001 From: Ploo <239304139+xinitrcn1@users.noreply.github.com> Date: Sun, 28 Dec 2025 07:56:17 +0000 Subject: [PATCH 2/2] Update Platform.cs --- LibGit2Sharp/Core/Platform.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LibGit2Sharp/Core/Platform.cs b/LibGit2Sharp/Core/Platform.cs index 1fcb59faf..ea70f963f 100644 --- a/LibGit2Sharp/Core/Platform.cs +++ b/LibGit2Sharp/Core/Platform.cs @@ -23,7 +23,7 @@ public static OperatingSystemType OperatingSystem return OperatingSystemType.Windows; } - if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) || RuntimeInformation.IsOSPlatform(OSPlatform.FreeBSD)) { return OperatingSystemType.Unix; }