File tree 3 files changed +23
-0
lines changed
3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -217,6 +217,8 @@ fn test_apple(target: &str) {
217
217
"stdio.h" ,
218
218
"stdlib.h" ,
219
219
"string.h" ,
220
+ "sys/attr.h" ,
221
+ "sys/clonefile.h" ,
220
222
"sys/event.h" ,
221
223
"sys/file.h" ,
222
224
"sys/ioctl.h" ,
Original file line number Diff line number Diff line change @@ -1514,6 +1514,8 @@ chflags
1514
1514
chroot
1515
1515
clearerr
1516
1516
clock_getres
1517
+ clonefile
1518
+ clonefileat
1517
1519
cmsghdr
1518
1520
connectx
1519
1521
cpu_subtype_t
@@ -1531,6 +1533,7 @@ exchangedata
1531
1533
faccessat
1532
1534
fchdir
1533
1535
fchflags
1536
+ fclonefileat
1534
1537
fdopendir
1535
1538
fgetxattr
1536
1539
flistxattr
Original file line number Diff line number Diff line change @@ -3835,6 +3835,24 @@ extern "C" {
3835
3835
outbytesleft : * mut :: size_t ,
3836
3836
) -> :: size_t ;
3837
3837
pub fn iconv_close ( cd : iconv_t ) -> :: c_int ;
3838
+
3839
+ // Copy-on-write functions.
3840
+ // According to the man page `flags` is an `int` but in the header
3841
+ // this is a `uint32_t`.
3842
+ pub fn clonefile ( src : * const :: c_char , dst : * const :: c_char , flags : u32 ) -> :: c_int ;
3843
+ pub fn clonefileat (
3844
+ src_dirfd : :: c_int ,
3845
+ src : * const :: c_char ,
3846
+ dst_dirfd : :: c_int ,
3847
+ dst : * const :: c_char ,
3848
+ flags : u32 ,
3849
+ ) -> :: c_int ;
3850
+ pub fn fclonefileat (
3851
+ srcfd : :: c_int ,
3852
+ dst_dirfd : :: c_int ,
3853
+ dst : * const :: c_char ,
3854
+ flags : u32 ,
3855
+ ) -> :: c_int ;
3838
3856
}
3839
3857
3840
3858
cfg_if ! {
You can’t perform that action at this time.
0 commit comments