Skip to content

Commit

Permalink
Add __errno_location on Redox, DragonFlyBSD, Haiku
Browse files Browse the repository at this point in the history
  • Loading branch information
josephlr committed Jul 9, 2019
1 parent 1375b11 commit 4fc38ca
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/unix/bsd/freebsdlike/freebsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1132,8 +1132,6 @@ f! {
}

extern {
pub fn __error() -> *mut ::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_settime(clk_id: ::clockid_t, tp: *const ::timespec) -> ::c_int;
Expand Down
2 changes: 2 additions & 0 deletions src/unix/bsd/freebsdlike/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1086,6 +1086,8 @@ f! {
}

extern {
pub fn __error() -> *mut ::c_int;

pub fn sem_destroy(sem: *mut sem_t) -> ::c_int;
pub fn sem_init(sem: *mut sem_t,
pshared: ::c_int,
Expand Down
1 change: 1 addition & 0 deletions src/unix/haiku/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1267,6 +1267,7 @@ extern {
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 _errnop() -> *mut libc::c_int;

pub fn abs(i: ::c_int) -> ::c_int;
pub fn atof(s: *const ::c_char) -> ::c_double;
Expand Down
1 change: 1 addition & 0 deletions src/unix/redox/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,7 @@ extern {

pub fn strerror_r(errnum: ::c_int, buf: *mut c_char,
buflen: ::size_t) -> ::c_int;
pub fn __errno_location() -> *mut libc::c_int;

// malloc.h
pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void;
Expand Down

0 comments on commit 4fc38ca

Please sign in to comment.