fix CI for *bsd

This commit is contained in:
Alexander Weiss 2023-01-24 06:32:51 +01:00
parent b054204cc2
commit 442ee8a561
2 changed files with 19 additions and 7 deletions

View File

@ -47,9 +47,9 @@ jobs:
architecture: i686
binary-postfix: ""
use-cross: true
- os: openbsd-latest
os-name: openbsd
target: x86_64-unknown-openbsd
- os: ubuntu-latest
os-name: netbsd
target: x86_64-unknown-netbsd
architecture: x86_64
binary-postfix: ""
use-cross: true

View File

@ -231,17 +231,29 @@ impl LocalBackend {
symlink(linktarget, filename)?;
}
NodeType::Dev { device } => {
#[cfg(not(any(target_os = "macos", target_os = "openbsd")))]
#[cfg(not(any(
target_os = "macos",
target_os = "openbsd",
target_os = "freebsd"
)))]
let device = *device;
#[cfg(any(target_os = "macos", target_os = "openbsd"))]
let device = *device as i32;
let device = i32::try_from(*device)?;
#[cfg(target_os = "freebsd")]
let device = u32::try_from(*device)?;
mknod(&filename, SFlag::S_IFBLK, Mode::empty(), device)?;
}
NodeType::Chardev { device } => {
#[cfg(not(any(target_os = "macos", target_os = "openbsd")))]
#[cfg(not(any(
target_os = "macos",
target_os = "openbsd",
target_os = "freebsd"
)))]
let device = *device;
#[cfg(any(target_os = "macos", target_os = "openbsd"))]
let device = *device as i32;
let device = i32::try_from(*device)?;
#[cfg(target_os = "freebsd")]
let device = u32::try_from(*device)?;
mknod(&filename, SFlag::S_IFCHR, Mode::empty(), device)?;
}
NodeType::Fifo => {