Fix libstd on DragonFly
Following changes: * birthtime does not exist on DragonFly * errno: __dfly_error is no more. Use #[thread_local] static errno. * clock_gettime expects a c_ulong (use a type alias) These changes are required to build DragonFly snapshots again.
This commit is contained in:
parent
a9f34c86a4
commit
60c988ec17
3 changed files with 17 additions and 12 deletions
|
@ -303,8 +303,13 @@ mod inner {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(not(target_os = "dragonfly"))]
|
||||
pub type clock_t = libc::c_int;
|
||||
#[cfg(target_os = "dragonfly")]
|
||||
pub type clock_t = libc::c_ulong;
|
||||
|
||||
impl Timespec {
|
||||
pub fn now(clock: libc::c_int) -> Timespec {
|
||||
pub fn now(clock: clock_t) -> Timespec {
|
||||
let mut t = Timespec {
|
||||
t: libc::timespec {
|
||||
tv_sec: 0,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue