mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Remove the property disabling optimization (#19701)
This commit is contained in:
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user