fn mktime(secs: u64, nsecs: u64) -> u64 { secs * 1000 + nsecs / 1000000 }
#[cfg(target_os = "bitrig")]
- fn ctime(stat: &libc::stat) -> u64 {
+ 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)
}
#[cfg(target_os = "bitrig")]
- fn atime(stat: &libc::stat) -> u64 {
+ 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)
}
#[cfg(target_os = "bitrig")]
- fn mtime(stat: &libc::stat) -> u64 {
+ 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)
}
static mut PAGE_SIZE: uint = 0;
static mut GUARD_PAGE: uint = 0;
- #[cfg(any(target_os = "macos",
+ #[cfg(any(target_os = "macos",
target_os = "bitrig",
target_os = "openbsd"))]
unsafe fn get_stack_start() -> *mut libc::c_void {
// Apparently android provides this in some other library?
// Bitrig's RT extensions are in the C library, not a separate librt
// OpenBSD provide it via libc
- #[cfg(not(any(target_os = "android",
+ #[cfg(not(any(target_os = "android",
target_os = "bitrig",
target_os = "openbsd")))]
#[link(name = "rt")]