Remove the property disabling optimization (#19701)

This commit is contained in:
Patrick Meinecke
2023-06-05 16:45:11 -07:00
committed by GitHub
parent b77d51062f
commit cc05fdead2
2 changed files with 5 additions and 11 deletions
@@ -932,8 +932,10 @@ namespace System.Management.Automation
[LibraryImport(psLib)]
internal static partial int WaitPid(int pid, [MarshalAs(UnmanagedType.Bool)] bool nohang);
// This is a struct tm from <time.h>.
[StructLayout(LayoutKind.Sequential)]
// This is the struct `private_tm` from setdate.h in libpsl-native.
// Packing is set to 4 to match the unmanaged declaration.
// https://github.com/PowerShell/PowerShell-Native/blob/c5575ceb064e60355b9fee33eabae6c6d2708d14/src/libpsl-native/src/setdate.h#L23
[StructLayout(LayoutKind.Sequential, Pack = 4)]
internal unsafe struct UnixTm
{
/// <summary>Seconds (0-60).</summary>
@@ -980,7 +982,7 @@ namespace System.Management.Automation
return tm;
}
[LibraryImport(psLib)]
[LibraryImport(psLib, SetLastError = true)]
internal static unsafe partial int SetDate(UnixTm* tm);
[LibraryImport(psLib, StringMarshalling = StringMarshalling.Utf8)]