// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
+using System;
using System.Runtime.InteropServices;
internal static partial class Interop
internal static extern unsafe int Write(SafeHandle fd, byte* buffer, int bufferSize);
[DllImport(Libraries.SystemNative, EntryPoint = "SystemNative_Write", SetLastError = true)]
- internal static extern unsafe int Write(int fd, byte* buffer, int bufferSize);
+ internal static extern unsafe int Write(IntPtr fd, byte* buffer, int bufferSize);
}
}
// Write to the pipe, which will wake up the event loop and cause it to exit.
//
byte b = 1;
- int bytesWritten = Interop.Sys.Write(_shutdownWritePipe, &b, 1);
+ int bytesWritten = Interop.Sys.Write((IntPtr)_shutdownWritePipe, &b, 1);
if (bytesWritten != 1)
{
throw new InternalException(bytesWritten);
int totalBytesWritten = 0;
while (bufCount > 0)
{
- int bytesWritten = Interop.Sys.Write(2 /* stderr */, buf + totalBytesWritten, bufCount);
+ int bytesWritten = Interop.Sys.Write((IntPtr)2 /* stderr */, buf + totalBytesWritten, bufCount);
if (bytesWritten < 0)
{
// On error, simply stop writing the debug output. This could commonly happen if stderr