From 6276d19e5efd850bd841bc354edc3f82be7c5ecc Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sun, 24 Oct 2021 12:26:24 +0100 Subject: [PATCH] freebsd 13 add copy_file_range api compatible with linux's glibc wrapper --- src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs b/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs index 92ea7f5aa228b..722ca697f3d61 100644 --- a/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs @@ -290,6 +290,15 @@ extern "C" { mask: *const ::domainset_t, 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; } #[link(name = "kvm")]