Skip to content

Commit 973c3e1

Browse files
committed
Auto merge of rust-lang#3133 - slp:musl-copy-file-range, r=JohnTitor
linux/musl: add copy_file_range syscall wrapper musl supports copy_file_range since v1.1.24, so expose the corresponding wrapper here too.
2 parents b8e2476 + 19084be commit 973c3e1

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
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/gnu/mod.rs

-8
Original file line numberDiff line numberDiff line change
@@ -1212,14 +1212,6 @@ extern "C" {
12121212
pub fn ntp_gettime(buf: *mut ntptimeval) -> ::c_int;
12131213
pub fn clock_adjtime(clk_id: ::clockid_t, buf: *mut ::timex) -> ::c_int;
12141214

1215-
pub fn copy_file_range(
1216-
fd_in: ::c_int,
1217-
off_in: *mut ::off64_t,
1218-
fd_out: ::c_int,
1219-
off_out: *mut ::off64_t,
1220-
len: ::size_t,
1221-
flags: ::c_uint,
1222-
) -> ::ssize_t;
12231215
pub fn fanotify_mark(
12241216
fd: ::c_int,
12251217
flags: ::c_uint,

src/unix/linux_like/linux/mod.rs

+9
Original file line numberDiff line numberDiff line change
@@ -4714,6 +4714,15 @@ extern "C" {
47144714
longopts: *const option,
47154715
longindex: *mut ::c_int,
47164716
) -> ::c_int;
4717+
4718+
pub fn copy_file_range(
4719+
fd_in: ::c_int,
4720+
off_in: *mut ::off64_t,
4721+
fd_out: ::c_int,
4722+
off_out: *mut ::off64_t,
4723+
len: ::size_t,
4724+
flags: ::c_uint,
4725+
) -> ::ssize_t;
47174726
}
47184727

47194728
cfg_if! {

0 commit comments

Comments
 (0)