linux: Fix implicit conversion error on ARM (see https://crbug.com/1292951#c100)

This commit is contained in:
Marshall Greenblatt
2022-07-26 10:10:12 -07:00
parent 5034749463
commit 02d7a758fe
2 changed files with 24 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
diff --git linux_syscall_support.h linux_syscall_support.h
index e4e816f..bbbd338 100644
--- linux_syscall_support.h
+++ linux_syscall_support.h
@@ -4861,7 +4861,12 @@ struct kernel_statfs {
size_t count, loff_t off) {
union { loff_t off; unsigned arg[2]; } o = { off };
return LSS_NAME(_pwrite64)(fd, buf, count,
- LSS_LLARG_PAD o.arg[0], o.arg[1]);
+ LSS_LLARG_PAD o.arg[0],
+#if !defined(__ARM_EABI__) && !defined(__mips__)
+ static_cast<long>(o.arg[1]));
+#else
+ o.arg[1]);
+#endif
}
LSS_INLINE int LSS_NAME(readahead)(int fd, loff_t off, size_t count) {
union { loff_t off; unsigned arg[2]; } o = { off };