summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-11-30 22:57:15 +0000
committerbors <bors@rust-lang.org>2022-11-30 22:57:15 +0000
commit15d27952bfa93e5e4f419c603f275486f15a050c (patch)
treec81c4fee799bf669bf29d38b638e8aa68208a390 /src
parentd6fe78238726fc23e722dc89d62b3d63acf2ff1f (diff)
parent5756980eb3c217ec38e05a890a85d744eded96b7 (diff)
downloadrust-libc-15d27952bfa93e5e4f419c603f275486f15a050c.tar.gz
Auto merge of #3023 - asomers:copy_file_range, r=JohnTitor
Enable copy_file_range on FreeBSD PR #2479 did this, but only in the freebsd13 and freebsd14 modules, which was incorrect. Those modules should only be used for functions that change across FreeBSD versions, and therefore need different ELF symbol versions. Functions that were newly added since FreeBSD 11 can still go in the base freebsd module. It will cause no problems for them to be there, and users will see an error at link time if they try to use such a function in an environment that is too old to support it.
Diffstat (limited to 'src')
-rw-r--r--src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs9
-rw-r--r--src/unix/bsd/freebsdlike/freebsd/freebsd14/mod.rs9
-rw-r--r--src/unix/bsd/freebsdlike/freebsd/mod.rs9
3 files changed, 9 insertions, 18 deletions
diff --git a/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs b/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs
index 798431c35e..72a38dc226 100644
--- a/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs
+++ b/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs
@@ -527,15 +527,6 @@ extern "C" {
policy: ::c_int,
) -> ::c_int;
- pub fn copy_file_range(
- infd: ::c_int,
- inoffp: *mut ::off_t,
- outfd: ::c_int,
- outoffp: *mut ::off_t,
- len: ::size_t,
- flags: ::c_uint,
- ) -> ::ssize_t;
-
pub fn dirname(path: *mut ::c_char) -> *mut ::c_char;
pub fn basename(path: *mut ::c_char) -> *mut ::c_char;
}
diff --git a/src/unix/bsd/freebsdlike/freebsd/freebsd14/mod.rs b/src/unix/bsd/freebsdlike/freebsd/freebsd14/mod.rs
index 3e0ec40519..115b47764e 100644
--- a/src/unix/bsd/freebsdlike/freebsd/freebsd14/mod.rs
+++ b/src/unix/bsd/freebsdlike/freebsd/freebsd14/mod.rs
@@ -527,15 +527,6 @@ extern "C" {
policy: ::c_int,
) -> ::c_int;
- pub fn copy_file_range(
- infd: ::c_int,
- inoffp: *mut ::off_t,
- outfd: ::c_int,
- outoffp: *mut ::off_t,
- len: ::size_t,
- flags: ::c_uint,
- ) -> ::ssize_t;
-
pub fn dirname(path: *mut ::c_char) -> *mut ::c_char;
pub fn basename(path: *mut ::c_char) -> *mut ::c_char;
}
diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs
index 9847030f80..2a4fbbf05f 100644
--- a/src/unix/bsd/freebsdlike/freebsd/mod.rs
+++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs
@@ -3954,6 +3954,15 @@ extern "C" {
pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int;
pub fn aio_writev(aiocbp: *mut ::aiocb) -> ::c_int;
+ pub fn copy_file_range(
+ infd: ::c_int,
+ inoffp: *mut ::off_t,
+ outfd: ::c_int,
+ outoffp: *mut ::off_t,
+ len: ::size_t,
+ flags: ::c_uint,
+ ) -> ::ssize_t;
+
pub fn devname_r(
dev: ::dev_t,
mode: ::mode_t,