Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions agent/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ mod os_constants {
mod os_constants {
pub const UNIT: &str = "/etc/systemd/system/buildomat-agent.service";
}
#[cfg(any(target_os = "illumos", target_os = "linux"))]
use os_constants::*;

use crate::control::protocol::StoreEntry;
Expand Down Expand Up @@ -859,6 +860,11 @@ fn set_nodename(name: &str) -> Result<()> {
Ok(())
}

#[cfg(not(any(target_os = "illumos", target_os = "linux")))]
fn set_nodename(_name: &str) -> Result<()> {
bail!("setting the nodename is not supported on this operating system")
}

fn zfs_exists(dataset: &str) -> Result<bool> {
let out = Command::new("/sbin/zfs")
.arg("get")
Expand Down
2 changes: 1 addition & 1 deletion factory/lab/src/host.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ fn thread_serial(
unsafe {
cmd.pre_exec(move || {
libc::setsid();
libc::ioctl(sub, libc::TIOCSCTTY, 0);
libc::ioctl(sub, libc::TIOCSCTTY as _, 0);
libc::dup2(sub, 0);
libc::dup2(sub, 1);
libc::dup2(sub, 2);
Expand Down
4 changes: 2 additions & 2 deletions factory/lab/src/pty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ impl Pty {
&mut m,
&mut s,
ptr::null_mut(),
ptr::null(),
ptr::null(),
ptr::null_mut(),
ptr::null_mut(),
)
};
if r != 0 {
Expand Down