Skip to content

Commit

Permalink
Fix illumos-x64 build (#70956)
Browse files Browse the repository at this point in the history
  • Loading branch information
am11 authored Jun 20, 2022
1 parent 61b5d61 commit 2b0d0d1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ internal static partial class @procfs
/// true if the process status was read; otherwise, false.
/// </returns>
[LibraryImport(Libraries.SystemNative, EntryPoint = "SystemNative_ReadProcessStatusInfo", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
private static unsafe partial bool TryReadProcessStatusInfo(int pid, ProcessStatusInfo* processStatus);

internal struct ProcessStatusInfo
Expand Down
3 changes: 2 additions & 1 deletion src/native/libs/System.Native/pal_networking.c
Original file line number Diff line number Diff line change
Expand Up @@ -3132,6 +3132,7 @@ int32_t SystemNative_SendFile(intptr_t out_fd, intptr_t in_fd, int64_t offset, i
int outfd = ToFileDescriptor(out_fd);
int infd = ToFileDescriptor(in_fd);
off_t offtOffset = (off_t)offset;
int savedErrno;

#if HAVE_SENDFILE_4
ssize_t res;
Expand Down Expand Up @@ -3251,7 +3252,7 @@ int32_t SystemNative_SendFile(intptr_t out_fd, intptr_t in_fd, int64_t offset, i
return Error_SUCCESS;

error:
int savedErrno = errno;
savedErrno = errno;
free(buffer);
return SystemNative_ConvertErrorPlatformToPal(savedErrno);

Expand Down

0 comments on commit 2b0d0d1

Please sign in to comment.