diff options
author | Sergio Lopez <slp@redhat.com> | 2023-03-03 09:38:30 +0100 |
---|---|---|
committer | Sergio Lopez <slp@redhat.com> | 2023-03-03 09:58:20 +0100 |
commit | 272fd47928115f66a23e7218915ababe6c6a1ed2 (patch) | |
tree | d231ce2c06477ff44bc224c1015e26a3a20731fb /src/unix | |
parent | 2bafdcf631478f8ac4bbe7934852731685f52cc9 (diff) | |
download | rust-libc-272fd47928115f66a23e7218915ababe6c6a1ed2.tar.gz |
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 <slp@redhat.com>
Diffstat (limited to 'src/unix')
-rw-r--r-- | src/unix/linux_like/linux/musl/mod.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/unix/linux_like/linux/musl/mod.rs b/src/unix/linux_like/linux/musl/mod.rs index 454ab53eb1..c7294e5c2f 100644 --- a/src/unix/linux_like/linux/musl/mod.rs +++ b/src/unix/linux_like/linux/musl/mod.rs @@ -773,6 +773,15 @@ extern "C" { pub fn dirname(path: *mut ::c_char) -> *mut ::c_char; pub fn basename(path: *mut ::c_char) -> *mut ::c_char; + + 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! { |