ayaports/user/dotnet8-runtime/runtime_remove-usage-of-off64-t.patch

26 lines
1.4 KiB
Diff

diff --git a/src/runtime/src/coreclr/debug/createdump/crashinfounix.cpp.orig b/src/runtime/src/coreclr/debug/createdump/crashinfounix.cpp
index 20b2494..165b190 100644
--- a/src/runtime/src/coreclr/debug/createdump/crashinfounix.cpp.orig
+++ b/src/runtime/src/coreclr/debug/createdump/crashinfounix.cpp
@@ -469,7 +469,7 @@ CrashInfo::ReadProcessMemory(void* address, void* buffer, size_t size, size_t* r
// performance optimization.
m_canUseProcVmReadSyscall = false;
assert(m_fdMem != -1);
- *read = pread64(m_fdMem, buffer, size, (off64_t)address);
+ *read = pread(m_fdMem, buffer, size, (off_t)address);
}
if (*read == (size_t)-1)
diff --git a/src/runtime/src/coreclr/debug/createdump/crashinfo.cpp.orig b/src/runtime/src/coreclr/debug/createdump/crashinfo.cpp
index 5addb79..79655d1 100644
--- a/src/runtime/src/coreclr/debug/createdump/crashinfo.cpp.orig
+++ b/src/runtime/src/coreclr/debug/createdump/crashinfo.cpp
@@ -760,7 +760,7 @@ CrashInfo::PageMappedToPhysicalMemory(uint64_t start)
}
uint64_t pagemapOffset = (start / PAGE_SIZE) * sizeof(uint64_t);
- uint64_t seekResult = lseek64(m_fdPagemap, (off64_t) pagemapOffset, SEEK_SET);
+ uint64_t seekResult = lseek(m_fdPagemap, (off_t) pagemapOffset, SEEK_SET);
if (seekResult != pagemapOffset)
{
int seekErrno = errno;