Skip to content

Commit 83ba532

Browse files
author
Andrew Salmon
committed
make modifications for proper build.
1 parent 27c693e commit 83ba532

File tree

6 files changed

+11
-6
lines changed

6 files changed

+11
-6
lines changed

src/unix/bsd/apple/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1699,7 +1699,9 @@ extern {
16991699
link_name = "waitid$UNIX2003")]
17001700
pub fn waitid(idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t,
17011701
options: ::c_int) -> ::c_int;
1702-
1702+
pub fn brk(addr: *const ::c_void) -> *mut ::c_void;
1703+
pub fn sbrk(increment: ::c_int) -> *mut ::c_void;
1704+
pub fn settimeofday(tv: *const timeval, tz: *const ::timezone) -> ::c_int;
17031705
}
17041706

17051707
cfg_if! {

src/unix/bsd/freebsdlike/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,6 +1028,7 @@ extern {
10281028
nfds: ::nfds_t,
10291029
timeout: *const ::timespec,
10301030
sigmask: *const sigset_t) -> ::c_int;
1031+
pub fn settimeofday(tv: *const timeval, tz: *const ::timezone) -> ::c_int;
10311032
}
10321033

10331034
cfg_if! {

src/unix/bsd/netbsdlike/netbsd/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,8 @@ extern {
719719
pub fn newlocale(mask: ::c_int,
720720
locale: *const ::c_char,
721721
base: ::locale_t) -> ::locale_t;
722+
#[link_name = "__settimeofday50"]
723+
pub fn settimeofday(tv: *const timeval, tz: *const ::c_void) -> ::c_int;
722724
}
723725

724726
mod other;

src/unix/mod.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -518,9 +518,6 @@ extern {
518518
link_name = "kill$UNIX2003")]
519519
pub fn kill(pid: pid_t, sig: ::c_int) -> ::c_int;
520520

521-
pub fn brk(addr: *mut ::c_void) -> ::c_int;
522-
pub fn sbrk(increment: ::intptr_t) -> *mut ::c_void;
523-
524521
pub fn mlock(addr: *const ::c_void, len: ::size_t) -> ::c_int;
525522
pub fn munlock(addr: *const ::c_void, len: ::size_t) -> ::c_int;
526523
pub fn mlockall(flags: ::c_int) -> ::c_int;
@@ -587,8 +584,6 @@ extern {
587584
#[cfg_attr(target_os = "netbsd", link_name = "__gettimeofday50")]
588585
pub fn gettimeofday(tp: *mut ::timeval,
589586
tz: *mut ::c_void) -> ::c_int;
590-
#[cfg_attr(target_os = "netbsd", link_name = "__settimeofday50")]
591-
pub fn settimeofday(tv: *const timeval, tz: *const ::timezone) -> ::c_int;
592587
#[cfg_attr(target_os = "netbsd", link_name = "__times13")]
593588
pub fn times(buf: *mut ::tms) -> ::clock_t;
594589

src/unix/notbsd/linux/mips/mips64.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ pub type rlim_t = ::c_ulong;
1212
pub type suseconds_t = i64;
1313
pub type time_t = i64;
1414
pub type wchar_t = i32;
15+
pub type clock_t = i64;
1516

1617
s! {
1718
pub struct aiocb {

src/unix/notbsd/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -835,6 +835,8 @@ extern {
835835
rqtp: *const ::timespec,
836836
rmtp: *mut ::timespec) -> ::c_int;
837837
pub fn clock_settime(clk_id: clockid_t, tp: *const ::timespec) -> ::c_int;
838+
pub fn settimeofday(tv: *const timeval, tz: *const ::timezone) -> ::c_int;
839+
838840
pub fn prctl(option: ::c_int, ...) -> ::c_int;
839841
pub fn pthread_getattr_np(native: ::pthread_t,
840842
attr: *mut ::pthread_attr_t) -> ::c_int;
@@ -984,6 +986,8 @@ extern {
984986
pub fn clearenv() -> ::c_int;
985987
pub fn waitid(idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t,
986988
options: ::c_int) -> ::c_int;
989+
pub fn brk(addr: *mut ::c_void) -> ::c_int;
990+
pub fn sbrk(increment: ::intptr_t) -> *mut ::c_void;
987991
}
988992

989993
cfg_if! {

0 commit comments

Comments
 (0)