Imported Upstream version 6.12.0.140

Former-commit-id: ed640e59d63de60be89ee9bbe5a6b63afcf639f5
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2021-04-30 08:47:39 +00:00
parent 611f410153
commit 3cbb9c7924
59 changed files with 808 additions and 754 deletions

View File

@@ -53,16 +53,19 @@ internal static partial class Interop
}
}
[DllImport(Libraries.SystemNative, EntryPoint = "SystemNative_OpenDir", SetLastError = true)]
internal static extern IntPtr OpenDir(string path);
[DllImport(Libraries.SystemNative, EntryPoint = "SystemNative_GetReadDirRBufferSize", SetLastError = false)]
internal static extern int GetReadDirRBufferSize();
#if !MONO
[DllImport(Libraries.SystemNative, EntryPoint = "SystemNative_OpenDir", SetLastError = true)]
internal static extern IntPtr OpenDir(string path);
[DllImport(Libraries.SystemNative, EntryPoint = "SystemNative_ReadDirR", SetLastError = false)]
internal static extern unsafe int ReadDirR(IntPtr dir, byte* buffer, int bufferSize, out DirectoryEntry outputEntry);
[DllImport(Libraries.SystemNative, EntryPoint = "SystemNative_CloseDir", SetLastError = true)]
internal static extern int CloseDir(IntPtr dir);
#endif
}
}
}

View File

@@ -455,7 +455,7 @@ int32_t SystemNative_ReadDirR(DIR* dir, uint8_t* buffer, int32_t bufferSize, str
// kernel set errno -> failure
if (errno != 0)
{
assert_err(errno == EBADF, "Invalid directory stream descriptor dir", errno);
assert_err(errno == EBADF || errno == EINTR, "Invalid directory stream descriptor dir", errno);
return errno;
}
return -1;