mirror of
https://github.com/fluencelabs/musl
synced 2025-06-06 19:41:34 +00:00
fix sendfile syscall to use 64-bit off_t
somehow the remapping of this syscall to the 64-bit version was overlooked. the issue was found, and patch provided, by Stefan Kristiansson. presumably the reason this bug was not caught earlier is that the syscall takes a pointer to off_t rather than a value, so on little-endian systems, everything appears to work as long as the offset value fits in the low 31 bits. on big-endian systems, though, sendfile was presumably completely non-functional.
This commit is contained in:
parent
dd5f50da6f
commit
55f45bc722
@ -163,6 +163,11 @@ long __syscall_ret(unsigned long), __syscall(syscall_arg_t, ...),
|
|||||||
#define SYS_fadvise SYS_fadvise64_64
|
#define SYS_fadvise SYS_fadvise64_64
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef SYS_sendfile64
|
||||||
|
#undef SYS_sendfile
|
||||||
|
#define SYS_sendfile SYS_sendfile64
|
||||||
|
#endif
|
||||||
|
|
||||||
/* socketcall calls */
|
/* socketcall calls */
|
||||||
|
|
||||||
#define __SC_socket 1
|
#define __SC_socket 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user