This fixes the following compilation error: no known conversion from 'off_t *'
(aka 'long long *') to 'long' for 5th argument.
Since pointers are 32-bit long anyway, casting it to long shouldn't be a
problem. Tested on rv32.
Differential D157792
[libc] Fix compilation on 32-bit systems Authored by mikhail.ramalho on Aug 12 2023, 11:09 AM.
Details
This fixes the following compilation error: no known conversion from 'off_t *' Since pointers are 32-bit long anyway, casting it to long shouldn't be a
Diff Detail
Event Timeline
| |||||||||||||
At this point, the best would probably be:
#ifdef SYS_llseek constexpr long LLSEEK_SYSCALL_NO = SYS_llseek; #elif defined(SYS__llseek) constexpr long LSEEK_SYSCALL_NO = SYS__llseek; #else #error ... #endif int ret = __llvm_libc::syscall_impl<int>(LLSEEK_SYSCALL_NO, fd, offset >> 32, offset, &result, whence);