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

This commit is contained in:
Marshall Greenblatt 2022-07-27 11:05:04 -07:00
parent 654f570b6e
commit f148af1bd6
1 changed files with 10 additions and 15 deletions

View File

@ -1,18 +1,13 @@
diff --git linux_syscall_support.h linux_syscall_support.h
index e4e816f..bbbd338 100644
index e4e816f..5ea1295 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 };
@@ -4842,7 +4842,7 @@ struct kernel_statfs {
unsigned, o2)
LSS_INLINE _syscall5(ssize_t, _pwrite64, int, f,
const void *, b, size_t, c, unsigned, o1,
- long, o2)
+ unsigned, o2)
LSS_INLINE _syscall4(int, _readahead, int, f,
unsigned, o1, unsigned, o2, size_t, c)
#endif