mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-09 22:49:57 +09:00
Merge pull request #2726 from sisungo/master
Change `os.rs` to build on musl libc
This commit is contained in:
@@ -1563,8 +1563,12 @@ mod _os {
|
||||
|
||||
// Safety: p_offset_src and p_offset_dst is a unique pointer for offset_src and offset_dst respectively,
|
||||
// and will only be freed after this function ends.
|
||||
//
|
||||
// Why not use `libc::copy_file_range`: On `musl-libc`, `libc::copy_file_range` is not provided. Therefore
|
||||
// we use syscalls directly instead.
|
||||
let ret = unsafe {
|
||||
libc::copy_file_range(
|
||||
libc::syscall(
|
||||
libc::SYS_copy_file_range,
|
||||
args.src,
|
||||
p_offset_src as *mut i64,
|
||||
args.dst,
|
||||
|
||||
Reference in New Issue
Block a user