1
Fork 0

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:
Michael Neumann 2016-04-02 19:06:16 +02:00
parent a9f34c86a4
commit 60c988ec17
3 changed files with 17 additions and 12 deletions

View file

@ -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,