Skip to content

Commit 7e2f12f

Browse files
authored
Merge pull request #1495 from asomers/fbsd_statfs
Fix the link_name for fstat and fstatfs on FreeBSD
2 parents 9af04ce + f7245fe commit 7e2f12f

File tree

1 file changed

+8
-0
lines changed
  • src/unix/bsd/freebsdlike/freebsd

1 file changed

+8
-0
lines changed

src/unix/bsd/freebsdlike/freebsd/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1312,7 +1312,15 @@ extern {
13121312
newfd: ::c_int,
13131313
) -> ::c_int;
13141314

1315+
#[cfg_attr(
1316+
all(target_os = "freebsd", freebsd11),
1317+
link_name = "statfs@FBSD_1.0"
1318+
)]
13151319
pub fn statfs(path: *const ::c_char, buf: *mut statfs) -> ::c_int;
1320+
#[cfg_attr(
1321+
all(target_os = "freebsd", freebsd11),
1322+
link_name = "fstatfs@FBSD_1.0"
1323+
)]
13161324
pub fn fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int;
13171325

13181326
pub fn dup3(src: ::c_int, dst: ::c_int, flags: ::c_int) -> ::c_int;

0 commit comments

Comments
 (0)