Skip to content

Commit

Permalink
Fix build for 32-bit Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
sorz committed Jun 9, 2022
1 parent bc5debd commit 9a3a8d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/linux/systemd.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use libc::{dev_t as Dev, ino_t as Inode};
use nix::sys::stat::fstat;
use sd_notify::{notify, NotifyState};
use std::{borrow::Cow, env, io, os::unix::prelude::AsRawFd, process, time::Duration};
Expand Down Expand Up @@ -57,7 +58,7 @@ pub async fn watchdog_loop(timeout: Duration) -> ! {
}

/// Try to read the device & inode number from environment variable `JOURNAL_STREAM`.
fn get_journal_stream_dev_ino() -> Option<(u64, u64)> {
fn get_journal_stream_dev_ino() -> Option<(Dev, Inode)> {
let stream_env = env::var_os("JOURNAL_STREAM")?;
let (dev, ino) = stream_env.to_str()?.split_once(':')?;
Some((dev.parse().ok()?, ino.parse().ok()?))
Expand Down

0 comments on commit 9a3a8d5

Please sign in to comment.