Skip to content

Commit 272fd47

Browse files
committed
linux/musl: add copy_file_range syscall wrapper
musl supports copy_file_range since v1.1.24, so expose the corresponding wrapper here too. Signed-off-by: Sergio Lopez <[email protected]>
1 parent 2bafdcf commit 272fd47

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

libc-test/semver/linux-musl.txt

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ aio_suspend
3333
aio_write
3434
aiocb
3535
clock_adjtime
36+
copy_file_range
3637
ctermid
3738
explicit_bzero
3839
futimes

src/unix/linux_like/linux/musl/mod.rs

+9
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,15 @@ extern "C" {
773773

774774
pub fn dirname(path: *mut ::c_char) -> *mut ::c_char;
775775
pub fn basename(path: *mut ::c_char) -> *mut ::c_char;
776+
777+
pub fn copy_file_range(
778+
fd_in: ::c_int,
779+
off_in: *mut ::off64_t,
780+
fd_out: ::c_int,
781+
off_out: *mut ::off64_t,
782+
len: ::size_t,
783+
flags: ::c_uint,
784+
) -> ::ssize_t;
776785
}
777786

778787
cfg_if! {

0 commit comments

Comments
 (0)