Update lang/rust to version 1.40.0
[dports.git] / lang / rust / dragonfly / patch-vendor_libc_src_unix_bsd_freebsdlike_dragonfly_mod.rs
1 --- vendor/libc/src/unix/bsd/freebsdlike/dragonfly/mod.rs.orig  2019-12-16 17:26:11 UTC
2 +++ vendor/libc/src/unix/bsd/freebsdlike/dragonfly/mod.rs
3 @@ -1053,7 +1053,17 @@ f! {
4      }
5  }
6  
7 +// DragonFlyBSD's __error function is declared with "static inline", so it must
8 +// be implemented in the libc crate, as a pointer to a static thread_local.
9 +f! {
10 +    pub fn __error() -> *mut ::c_int {
11 +        &mut errno
12 +    }
13 +}
14 +
15  extern "C" {
16 +    #[thread_local]
17 +    pub static mut errno: ::c_int;
18      pub fn setgrent();
19      pub fn mprotect(
20          addr: *mut ::c_void,