From f7245fedccc0c4bcfc3b1113709af6a105869a64 Mon Sep 17 00:00:00 2001 From: Alan Somers <asomers@gmail.com> Date: Mon, 2 Sep 2019 01:43:55 +0800 Subject: [PATCH] Fix the link_name for fstat and fstatfs on FreeBSD --- src/unix/bsd/freebsdlike/freebsd/mod.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs index d534af90..9329d7f8 100644 --- a/src/unix/bsd/freebsdlike/freebsd/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs @@ -1312,7 +1312,15 @@ extern { newfd: ::c_int, ) -> ::c_int; + #[cfg_attr( + all(target_os = "freebsd", freebsd11), + link_name = "statfs@FBSD_1.0" + )] pub fn statfs(path: *const ::c_char, buf: *mut statfs) -> ::c_int; + #[cfg_attr( + all(target_os = "freebsd", freebsd11), + link_name = "fstatfs@FBSD_1.0" + )] pub fn fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int; pub fn dup3(src: ::c_int, dst: ::c_int, flags: ::c_int) -> ::c_int; -- GitLab