summaryrefslogtreecommitdiff
path: root/src/unix/linux_like/linux
diff options
context:
space:
mode:
authorYuki Okushi <jtitor@2k36.org>2023-03-03 20:09:58 +0900
committerYuki Okushi <jtitor@2k36.org>2023-03-03 20:09:58 +0900
commit19084bee7ab9173b3bdb2e4c0ef7020bdf25de83 (patch)
treee111301604ff0195a916fd6576f7590402bd3e82 /src/unix/linux_like/linux
parent272fd47928115f66a23e7218915ababe6c6a1ed2 (diff)
downloadrust-libc-19084bee7ab9173b3bdb2e4c0ef7020bdf25de83.tar.gz
Move `copy_file_range` to `linux/mod.rs`
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
Diffstat (limited to 'src/unix/linux_like/linux')
-rw-r--r--src/unix/linux_like/linux/gnu/mod.rs8
-rw-r--r--src/unix/linux_like/linux/mod.rs9
-rw-r--r--src/unix/linux_like/linux/musl/mod.rs9
3 files changed, 9 insertions, 17 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 be12190b45..0501230af7 100644
--- a/src/unix/linux_like/linux/mod.rs
+++ b/src/unix/linux_like/linux/mod.rs
@@ -4702,6 +4702,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! {
diff --git a/src/unix/linux_like/linux/musl/mod.rs b/src/unix/linux_like/linux/musl/mod.rs
index c7294e5c2f..454ab53eb1 100644
--- a/src/unix/linux_like/linux/musl/mod.rs
+++ b/src/unix/linux_like/linux/musl/mod.rs
@@ -773,15 +773,6 @@ 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! {