summaryrefslogtreecommitdiff
path: root/src/unix/bsd/freebsdlike/freebsd
diff options
context:
space:
mode:
authorAlan Somers <asomers@gmail.com>2022-11-29 18:54:09 -0700
committerAlan Somers <asomers@gmail.com>2022-11-30 10:13:28 -0700
commit5756980eb3c217ec38e05a890a85d744eded96b7 (patch)
tree8aaeed0cf409c121298f8c82a51ac20bccfc9a7f /src/unix/bsd/freebsdlike/freebsd
parente4b8fd4f59a87346c870295c8125469c672998aa (diff)
downloadrust-libc-5756980eb3c217ec38e05a890a85d744eded96b7.tar.gz
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/unix/bsd/freebsdlike/freebsd')
-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 4064a3fe4e..ff5233665a 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,