From 61f2baa0af6b2a54e0c109e5f73c8ff25f9f2ca6 Mon Sep 17 00:00:00 2001 From: Daniel Mueller Date: Sat, 1 Jun 2019 11:46:58 -0700 Subject: Update libc crate to 0.2.57 This change updates the libc crate to version 0.2.57. Import subrepo libc/:libc at cdc48ea36d8d2890dba38e8f779001e6855339a2 --- libc/src/unix/bsd/mod.rs | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'libc/src/unix/bsd/mod.rs') diff --git a/libc/src/unix/bsd/mod.rs b/libc/src/unix/bsd/mod.rs index 03c987d..8bc6c7c 100644 --- a/libc/src/unix/bsd/mod.rs +++ b/libc/src/unix/bsd/mod.rs @@ -94,7 +94,7 @@ s! { } pub struct fsid_t { - __fsid_val: [::int32_t; 2], + __fsid_val: [i32; 2], } pub struct if_nameindex { @@ -488,6 +488,15 @@ f! { } extern { + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "getrlimit$UNIX2003")] + pub fn getrlimit(resource: ::c_int, rlim: *mut ::rlimit) -> ::c_int; + #[cfg_attr(all(target_os = "macos", target_arch = "x86"), + link_name = "setrlimit$UNIX2003")] + pub fn setrlimit(resource: ::c_int, rlim: *const ::rlimit) -> ::c_int; + + pub fn strerror_r(errnum: ::c_int, buf: *mut c_char, + buflen: ::size_t) -> ::c_int; pub fn abs(i: ::c_int) -> ::c_int; pub fn atof(s: *const ::c_char) -> ::c_double; pub fn labs(i: ::c_long) -> ::c_long; @@ -506,7 +515,6 @@ extern { pub fn getpwent() -> *mut passwd; pub fn setpwent(); pub fn endpwent(); - pub fn setgrent(); pub fn endgrent(); pub fn getgrent() -> *mut ::group; @@ -522,14 +530,20 @@ extern { #[cfg_attr(target_os = "macos", link_name = "glob$INODE64")] #[cfg_attr(target_os = "netbsd", link_name = "__glob30")] - #[cfg_attr(target_os = "freebsd", link_name = "glob@FBSD_1.0")] + #[cfg_attr( + all(target_os = "freebsd", not(freebsd12)), + link_name = "glob@FBSD_1.0" + )] pub fn glob(pattern: *const ::c_char, flags: ::c_int, errfunc: ::Option ::c_int>, pglob: *mut ::glob_t) -> ::c_int; #[cfg_attr(target_os = "netbsd", link_name = "__globfree30")] - #[cfg_attr(target_os = "freebsd", link_name = "globfree@FBSD_1.0")] + #[cfg_attr( + all(target_os = "freebsd", not(freebsd12)), + link_name = "globfree@FBSD_1.0" + )] pub fn globfree(pglob: *mut ::glob_t); pub fn posix_madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int) -- cgit v1.2.1