dragonfly: Add errno behind libc_thread_local

This commit is contained in:
Joe Richey 2019-07-10 18:01:41 -07:00
parent b7a27b5c7c
commit 956ba42753
3 changed files with 11 additions and 2 deletions

View File

@ -1036,9 +1036,18 @@ f! {
(_CMSG_ALIGN(::mem::size_of::<::cmsghdr>()) + (_CMSG_ALIGN(::mem::size_of::<::cmsghdr>()) +
_CMSG_ALIGN(length as usize)) as ::c_uint _CMSG_ALIGN(length as usize)) as ::c_uint
} }
#[cfg(libc_thread_local)]
pub fn __error() -> *mut ::c_int {
&mut errno
}
} }
extern { extern {
#[cfg(libc_thread_local)]
#[thread_local]
static mut errno: ::c_int;
pub fn setgrent(); pub fn setgrent();
pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int) pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int)
-> ::c_int; -> ::c_int;

View File

@ -1132,6 +1132,8 @@ f! {
} }
extern { extern {
pub fn __error() -> *mut ::c_int;
pub fn clock_getres(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int; pub fn clock_getres(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
pub fn clock_gettime(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int; pub fn clock_gettime(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
pub fn clock_settime(clk_id: ::clockid_t, tp: *const ::timespec) -> ::c_int; pub fn clock_settime(clk_id: ::clockid_t, tp: *const ::timespec) -> ::c_int;

View File

@ -1098,8 +1098,6 @@ f! {
} }
extern { extern {
pub fn __error() -> *mut ::c_int;
pub fn sem_destroy(sem: *mut sem_t) -> ::c_int; pub fn sem_destroy(sem: *mut sem_t) -> ::c_int;
pub fn sem_init(sem: *mut sem_t, pub fn sem_init(sem: *mut sem_t,
pshared: ::c_int, pshared: ::c_int,