diff options
author | bors <bors@rust-lang.org> | 2023-03-03 13:42:44 +0000 |
---|---|---|
committer | bors <bors@rust-lang.org> | 2023-03-03 13:42:44 +0000 |
commit | 973c3e1fb8acd198f197fa2a25d99184fa1f5f4b (patch) | |
tree | 1eb083cd732e814e441b5e1c739810dee1950848 /src/unix/linux_like/linux | |
parent | b8e2476614b7b0a7c1eb6b6c7227c6c5be726062 (diff) | |
parent | 19084bee7ab9173b3bdb2e4c0ef7020bdf25de83 (diff) | |
download | rust-libc-973c3e1fb8acd198f197fa2a25d99184fa1f5f4b.tar.gz |
Auto merge of #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.
Diffstat (limited to 'src/unix/linux_like/linux')
-rw-r--r-- | src/unix/linux_like/linux/gnu/mod.rs | 8 | ||||
-rw-r--r-- | src/unix/linux_like/linux/mod.rs | 9 |
2 files changed, 9 insertions, 8 deletions
diff --git a/src/unix/linux_like/linux/gnu/mod.rs b/src/unix/linux_like/linux/gnu/mod.rs index 2d84ec662d..dbec992f0c 100644 --- a/src/unix/linux_like/linux/gnu/mod.rs +++ b/src/unix/linux_like/linux/gnu/mod.rs @@ -1212,14 +1212,6 @@ extern "C" { pub fn ntp_gettime(buf: *mut ntptimeval) -> ::c_int; pub fn clock_adjtime(clk_id: ::clockid_t, buf: *mut ::timex) -> ::c_int; - pub fn copy_file_range( - fd_in: ::c_int, - off_in: *mut ::off64_t, - fd_out: ::c_int, - off_out: *mut ::off64_t, - len: ::size_t, - flags: ::c_uint, - ) -> ::ssize_t; pub fn fanotify_mark( fd: ::c_int, flags: ::c_uint, diff --git a/src/unix/linux_like/linux/mod.rs b/src/unix/linux_like/linux/mod.rs index ce4889d653..45177dff46 100644 --- a/src/unix/linux_like/linux/mod.rs +++ b/src/unix/linux_like/linux/mod.rs @@ -4714,6 +4714,15 @@ extern "C" { longopts: *const option, longindex: *mut ::c_int, ) -> ::c_int; + + pub fn copy_file_range( + fd_in: ::c_int, + off_in: *mut ::off64_t, + fd_out: ::c_int, + off_out: *mut ::off64_t, + len: ::size_t, + flags: ::c_uint, + ) -> ::ssize_t; } cfg_if! { |