fixing a few bitrig build breakers
This commit is contained in:
parent
a5214e4330
commit
804c071d8b
2 changed files with 1 additions and 15 deletions
|
@ -291,29 +291,14 @@ fn mkstat(stat: &libc::stat) -> FileStat {
|
||||||
// FileStat times are in milliseconds
|
// FileStat times are in milliseconds
|
||||||
fn mktime(secs: u64, nsecs: u64) -> u64 { secs * 1000 + nsecs / 1000000 }
|
fn mktime(secs: u64, nsecs: u64) -> u64 { secs * 1000 + nsecs / 1000000 }
|
||||||
|
|
||||||
#[cfg(target_os = "bitrig")]
|
|
||||||
fn ctime(stat: &libc::stat) -> u64 {
|
|
||||||
mktime(stat.st_ctim.tv_sec as u64, stat.st_ctim.tv_nsec as u64)
|
|
||||||
}
|
|
||||||
#[cfg(not(target_os = "bitrig"))]
|
|
||||||
fn ctime(stat: &libc::stat) -> u64 {
|
fn ctime(stat: &libc::stat) -> u64 {
|
||||||
mktime(stat.st_ctime as u64, stat.st_ctime_nsec as u64)
|
mktime(stat.st_ctime as u64, stat.st_ctime_nsec as u64)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_os = "bitrig")]
|
|
||||||
fn atime(stat: &libc::stat) -> u64 {
|
|
||||||
mktime(stat.st_atim.tv_sec as u64, stat.st_atim.tv_nsec as u64)
|
|
||||||
}
|
|
||||||
#[cfg(not(target_os = "bitrig"))]
|
|
||||||
fn atime(stat: &libc::stat) -> u64 {
|
fn atime(stat: &libc::stat) -> u64 {
|
||||||
mktime(stat.st_atime as u64, stat.st_atime_nsec as u64)
|
mktime(stat.st_atime as u64, stat.st_atime_nsec as u64)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_os = "bitrig")]
|
|
||||||
fn mtime(stat: &libc::stat) -> u64 {
|
|
||||||
mktime(stat.st_mtim.tv_sec as u64, stat.st_mtim.tv_nsec as u64)
|
|
||||||
}
|
|
||||||
#[cfg(not(target_os = "bitrig"))]
|
|
||||||
fn mtime(stat: &libc::stat) -> u64 {
|
fn mtime(stat: &libc::stat) -> u64 {
|
||||||
mktime(stat.st_mtime as u64, stat.st_mtime_nsec as u64)
|
mktime(stat.st_mtime as u64, stat.st_mtime_nsec as u64)
|
||||||
}
|
}
|
||||||
|
|
|
@ -439,6 +439,7 @@ fn translate_status(status: c_int) -> ExitStatus {
|
||||||
target_os = "ios",
|
target_os = "ios",
|
||||||
target_os = "freebsd",
|
target_os = "freebsd",
|
||||||
target_os = "dragonfly",
|
target_os = "dragonfly",
|
||||||
|
target_os = "bitrig",
|
||||||
target_os = "openbsd"))]
|
target_os = "openbsd"))]
|
||||||
mod imp {
|
mod imp {
|
||||||
pub fn WIFEXITED(status: i32) -> bool { (status & 0x7f) == 0 }
|
pub fn WIFEXITED(status: i32) -> bool { (status & 0x7f) == 0 }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue